Software Engineer
Hi, I'm Rafael, but you can call me Rafa! 😄 I'm a software engineer passionate about everything that involves technology, with more than 5 years of experience in the market. Throughout my career, I worked in banking institutions, developing innovative solutions and contributing to the digital transformation of the financial sector. With a strong interest in software architecture and testing, I am constantly looking to specialize and improve my skills in this area. Here, you will find tips, tutorials and discussions on the most varied topics related to architecture, good practices and software testing, always with the aim of sharing knowledge and learning from other developers. I value the exchange of experiences and I am always willing to listen and learn from my professional colleagues. Feel free to get in contact, leave your comments and share your own experiences and knowledge. Together, we can build a stronger, more collaborative community in the software development world.
Markdown supported · ⌘↵ to post
Good points made about the number of branches and complexity. I think it's important to consider that some branches could be guard statements at the beginning of methods, and it's important to keep those in place.
It looks like xUnit is being used in the PhoneTest example. I know it's possible to parameterise tests in NUnit for different inputs to quickly test various scenarios (e.g. input length); I think this is possible with xUnit too, so we don't have to write a test for each input.
I completely agree that we should try to simplify code where possible though, and that breaking it into smaller modules can help. I usually break long methods into separate service classes where possible and inject them using dependency injection. A bonus of this is that the logic can be tested independently, and test setup does not have to include code that would otherwise be used to navigate to the code that needs testing.
Rahul Shinde
Thanks for sharing Rafael dos Santos Miguel Filho