Top "Unit-testing" questions

Unit testing is a method by which individual units of source code are tested to determine if they are fit for use.

How to run JUnit test cases from the command line

I would like to run JUnit test cases from the command line. How can I do this?

unit-testing command-line junit
Run a single test method with maven

I know you can run all the tests in a certain class using: mvn test -Dtest=classname But I want …

java maven unit-testing maven-2 maven-3
Unit test naming best practices

What are the best practices for naming unit test classes and test methods? This was discussed on SO before, at …

unit-testing naming-conventions
Using Mockito's generic "any()" method

I have an interface with a method that expects an array of Foo: public interface IBar { void doStuff(Foo[] arr); } …

java unit-testing mocking mockito
How to write a Unit Test?

I have a Java class. How can I unit test it? In my case, I have class does a binary …

java unit-testing
What are unit tests, integration tests, smoke tests, and regression tests?

What are unit tests, integration tests, smoke tests, and regression tests? What are the differences between them and which tools …

unit-testing testing definition
Difference between @Mock and @InjectMocks

What is the difference between @Mock and @InjectMocks in Mockito framework?

java unit-testing mocking mockito
Can Mockito capture arguments of a method called multiple times?

I have a method that gets called twice, and I want to capture the argument of the second method call. …

java unit-testing mocking mockito
Is Unit Testing worth the effort?

I am working to integrate unit testing into the development process on the team I work on and there are …

unit-testing
Mockito. Verify method arguments

I've googled about this, but didn't find anything relevant. I've got something like this: Object obj = getObject(); Mockeable mock= Mockito.…

java unit-testing junit mockito