Creează un cont pentru a te abona la acest blog și a-i urmări articolele pe pagina Lectură.
-
The Principle of Least Astonishment is the idea that software should behave in the way that least surprises the user.
-
Consider this method which registers a visitor to an event. public class Event { public void registerVisitor(String name, String phoneNumber) { if (name == null || name.trim().isEmpty()) throw new IllegalArgumentException("Name w…
-
Tests are often treated as write-once-never-look-at-again code (unless just maybe if there is a bug).
-
Many unit tests are brittle.
-
I’ve talked about extracting logic and moving it elsewhere and I want to give an example of how doing so can improve the code.
-
A common question when it comes to unit testing is: How do I test private methods?
-
Despite our best efforts, every now and then a bug slips through.
-
Most of us want to develop with quality.
-
Unit testing friendly code is code that has enough complexity and few dependencies.
-
Lots of developers feel that unit tests are not only hard to write, but also are more of a hinder than a help when working with the code.
-
Common questions from people trying to introduce unit tests in a legacy code base are How do I unit test code which calls a static method?
-
Working with a large code base, you get to see many different styles of unit testing.
-
When I develop code, I find it helps to use the following rule of thumb: What?