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.

What is a reasonable code coverage % for unit tests (and why)?

If you were to mandate a minimum percentage code-coverage for unit tests, perhaps even as a requirement for committing to …

unit-testing code-coverage code-metrics
Can Mockito stub a method without regard to the argument?

I'm trying to test some legacy code, using Mockito. I want to stub a FooDao that is used in production …

java unit-testing mocking mockito
Assert equals between 2 Lists in Junit

How can I make an equality assertion between lists in a JUnit test case? Equality should be between the content …

java unit-testing collections junit
Configuring IntelliJ IDEA for unit testing with JUnit

I decided to try out IntelliJ this morning via the trial version and installed the JUnit plugin. I made a …

unit-testing junit intellij-idea
jasmine: Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL

I have an angular service called requestNotificationChannel: app.factory("requestNotificationChannel", function($rootScope) { var _DELETE_MESSAGE_ = "_DELETE_MESSAGE_"; function deleteMessage(id, …

javascript angularjs unit-testing asynchronous jasmine
What's the best mock framework for Java?

What's the best framework for creating mock objects in Java? Why? What are the pros and cons of each framework?

java unit-testing mocking
What is unit testing and how do you do it?

Exact duplicate of many posts: What is unit testing? What Makes a Good Unit Test? New to Unit Testing Unit …

unit-testing
How to tell a Mockito mock object to return something different the next time it is called?

So, I'm creating a mock object as a static variable on the class level like so... In one test, I …

java unit-testing junit mocking mockito
Java verify void method calls n times with Mockito

I'm trying to verify that a (void) method is being called inside of a DAO - I'm using a commit …

java unit-testing junit mockito verify
What's the difference between faking, mocking, and stubbing?

I know how I use these terms, but I'm wondering if there are accepted definitions for faking, mocking, and stubbing …

unit-testing mocking language-agnostic terminology definition