tagged [testing]

ExpectedException in nUnit gave me an error

ExpectedException in nUnit gave me an error I'm new to using Testing Tools on the .NET Framework, so I downloaded it from NuGet with help from ReSharper. I am using this [Quick Start](http://nunit.org...

24 Nov at 14:57

.NET unit testing packages

.NET unit testing packages I am getting back into a bit more .NET after a few-years of not using it full-time and am wondering what the good unit testing packages are these days. I'm familiar with NUn...

30 Jul at 11:16

How to unit test abstract classes: extend with stubs?

How to unit test abstract classes: extend with stubs? I was wondering how to unit test abstract classes, and classes that extend abstract classes. Should I test the abstract class by extending it, stu...

Xunit multiple IClassFixtures

Xunit multiple IClassFixtures My question is How to setup multiple fixtures in one test class? But the constructor of Zoo class can not handle multiple fixtures. For exemple: ``` public class Zoo : IC...

30 Mar at 20:50

Unit Testing C Code

Unit Testing C Code I worked on an embedded system this summer written in straight C. It was an existing project that the company I work for had taken over. I have become quite accustomed to writing u...

8 Aug at 15:42

react-testing-library why is toBeInTheDocument() not a function

react-testing-library why is toBeInTheDocument() not a function Here is my code for a tooltip that toggles the CSS property `display: block` on MouseOver and on Mouse Out `display: none`. ``` it('shou...

Equivalent of assert.warning in mstest?

Equivalent of assert.warning in mstest? is there a MsTest Equivalent of Assert.Warning in MbUnit ?

3 Oct at 20:47

Difference between @Mock and @InjectMocks

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

23 Feb at 15:54

System testing vs Acceptance testing - Difference in test cases

System testing vs Acceptance testing - Difference in test cases I'm a bit confused about the real difference between system testing and acceptance testing. When I search this topic the answers differ ...

Are there any good automated test suites for Perl?

Are there any good automated test suites for Perl? Can someone suggest some good automated test suite framework for Perl?

1 Mar at 00:46

How do I test code that should never be executed?

How do I test code that should never be executed? Following method shall only be called if it has been verified that there are invalid digits (by calling another method). How can I test-cover the `thr...

20 Aug at 23:35

Set Up Test Method with different inputs

Set Up Test Method with different inputs I want to test the following method in C# for all code paths. I've seen this [pex unit testing](http://fernandomachadopirizen.wordpress.com/2010/05/19/unit-tes...

How to properly assert that an exception gets raised in pytest?

How to properly assert that an exception gets raised in pytest? ## Code: ## Output: ``` ================================ test session starts ================================= platform linux2 -

14 Feb at 14:6

What is Rhino Mocks Repeat?

What is Rhino Mocks Repeat? What is Rhino Mocks Repeat ? What does it mean and how it works ?

1 Jun at 09:21

What's the actual use of 'fail' in JUnit test case?

What's the actual use of 'fail' in JUnit test case? What's the actual use of 'fail' in JUnit test case?

12 Mar at 10:31

How can I unit test Roslyn diagnostics?

How can I unit test Roslyn diagnostics? How can I unit test my own custom analyzers and Code Fix providers?

Why use It.is<> or It.IsAny<> if I could just define a variable?

Why use It.is or It.IsAny if I could just define a variable? Hi I've been using moq for a while when I see this code. I have to setup a return in one of my repo. I have three parameters and I just saw...

26 Sep at 23:54

Using Moq to Mock a Func<> constructor parameter and Verify it was called twice

Using Moq to Mock a Func constructor parameter and Verify it was called twice Taken the question from this article ([How to moq a Func](https://stackoverflow.com/questions/6036708/how-to-moq-a-func)) ...

Unit testing for inner exceptions

Unit testing for inner exceptions I am writing some unit tests using Visual Studio's integrated framework. I need to write some test cases which pass when a proper exception is thrown. The problem is ...

How to run JUnit test cases from the command line

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?

11 Jun at 14:51

Should Dispose methods be unit tested?

Should Dispose methods be unit tested? I am using C#. Is it advised to unit test dispose methods? If so why, and how should one test these methods?

15 Jul at 20:11

Unit Test Description question

Unit Test Description question There is a description entry for Unit Tests in Visual Studio. Is it possible to modify a test description after creation?

Can you test a razor view on its own without the need for integration testing?

Can you test a razor view on its own without the need for integration testing? I've got an MVC website with many different steps a user has to take to get through it. There are validation check and ti...

What's the best mock framework for Java?

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?

28 Jan at 20:5

How to create unit tests which runs only when manually specified?

How to create unit tests which runs only when manually specified? I remember something like '', and google says that nunit has such attribute. Does provide something like this?

8 Feb at 17:28