tagged [nunit]
What is a good, free C# unit test coverage tool?
What is a good, free C# unit test coverage tool? I'm looking for a tool that I can run against my code base to determine which areas of my code are covered by NUnit tests I've written. I would appreci...
- Modified
- 1 Nov at 16:20
Use NUnit Assert.Throws method or ExpectedException attribute?
Use NUnit Assert.Throws method or ExpectedException attribute? I have discovered that these seem to be the two main ways of testing for exceptions: Which of these would be best? Does one offer advanta...
- Modified
- 6 Dec at 13:19
Microsoft PEX with NUnit
Microsoft PEX with NUnit I am thinking of using Microsoft PEX tools for my project, but I would much rather use NUnit instead of MSUnit. Apparently, [PEX Extensions project](http://pex.codeplex.com) w...
One-time initialization for NUnit
One-time initialization for NUnit Where should I place code that should only run once (and not once per class)? An example for this would be a statement that initializes the database connection string...
Nunit test setup method with argument
Nunit test setup method with argument Can we have a test set up method with arguments? I need a different set up for every test in a fixture. Do we have something (or similar way) as the hypothetical ...
- Modified
- 29 Apr at 10:22
How to run unit tests in STAThread mode?
How to run unit tests in STAThread mode? I would like to test an app that uses the Clipboard (WindowsForms) and I need the Clipboard in my unit tests also. In order to use it, it should run in STA mod...
Run/Group Tests by Category Attribute of NUnit in Visual Studio
Run/Group Tests by Category Attribute of NUnit in Visual Studio I am trying to use the Category Attribute of NUnit with my Visual Studio Profession 2015. However, the attribute doesn't seem to be cate...
- Modified
- 27 Oct at 01:40
When to use Assert.Catch versus Assert.Throws in Unit Testing
When to use Assert.Catch versus Assert.Throws in Unit Testing I'm just looking for some examples of when it is appropriate to use Assert.Catch or Assert.Throws for asserting any exceptions thrown in u...
- Modified
- 12 Aug at 17:45
NUnit+ReSharper: How to view results for TestFixture with different parameters?
NUnit+ReSharper: How to view results for TestFixture with different parameters? I have written unit tests under NUnit that use TestFixtures with different parameters. Now, when I run tests, I want to ...
Can I run NUnit tests from within Visual Studio 2010?
Can I run NUnit tests from within Visual Studio 2010? Is there an addon of some kind that will let me run and view results from inside Visual Studio? I remember there was some sort of icon with a red ...
- Modified
- 22 Aug at 13:13
C# NUnit TestCaseSource Passing Parameter
C# NUnit TestCaseSource Passing Parameter I have the following method which generates a set of test cases! How can I pass param which is of type string as a parameter to my `PrepareTestCases()` method...
Run Individual Test from Nunit3-console.exe
Run Individual Test from Nunit3-console.exe when i run The Console Runner Runs all my tests. what command do i need to run in order to run individual tests? i tried it says that I am using an invalid ...
- Modified
- 18 May at 11:9
nunit not working in windows 7 at all
nunit not working in windows 7 at all I am new to unit testing and this ism y first time trying NUnit. My environment is windows 7 professional 64 bit, visual studio 2010 and i am working on a windows...
- Modified
- 20 Jun at 09:12
How to execute NUnit test cases from command prompt
How to execute NUnit test cases from command prompt How can I execute a test case from Command Console using NUnit? I had set of Selenium Tests written in C# based on NUnit framework. I need to execut...
- Modified
- 18 Jun at 15:23
FluentAssertions: equivalence of sorted lists
FluentAssertions: equivalence of sorted lists I'm trying to establish equivalence of two lists using FluentAssertions in C#, where two things are of importance: 1. the elements are compared by the val...
- Modified
- 10 Oct at 09:8
How to find path of active app.config file?
How to find path of active app.config file? I'm trying to finish this exception handler: ``` if (ConfigurationManager.ConnectionStrings["ConnectionString"]==null) { string pathOfActiveConfigFile = ....
- Modified
- 17 Feb at 16:58
When do I use the TestFixtureSetUp attribute instead of a default constructor?
When do I use the TestFixtureSetUp attribute instead of a default constructor? The NUnit documentation doesn't tell me when to use a method with a `TestFixtureSetup` and when to do the setup in the co...
- Modified
- 2 Jul at 17:29
Unit Test Sessions Window Closes when debugging
Unit Test Sessions Window Closes when debugging When I select an NUnit test in the Unit Test Sessions window and click debug, the window disappears. My breakpoints are hit, but if I hit F5, the Unit T...
- Modified
- 26 May at 16:7
NUnit - Repeat test case for 3 times, If it fails
NUnit - Repeat test case for 3 times, If it fails I have few test cases for Web Site UI Automation. I want to try my test case at least three times, if it fails for first and second time. That way, I ...
- Modified
- 1 Feb at 21:57
NUnit: Dictionary Assert
NUnit: Dictionary Assert I want a , in NUnit, that asserts whether two dictionary are the same. i.e., I want a concise version of the below code: ``` public static void DictionaryAssert(Dictionary dic...
- Modified
- 30 Oct at 10:59
CollectionAssert.AreEquivalent with Custom IEqualityComparer
CollectionAssert.AreEquivalent with Custom IEqualityComparer I have two lists, I want to check whether the two lists are the same ( order not important), and whether it's the same depends on the `IEqu...
- Modified
- 25 Jul at 04:15
unit testing a unit of work
unit testing a unit of work new to unit testing. I have a unit of work that I am trying to unit test. I am probably missing something simple here. I am trying to unit test the Commit method. I am usin...
- Modified
- 14 Jun at 20:56
NUnit TestCaseSource
NUnit TestCaseSource I'm having a go with the TestCaseSource attribute. One problem: when the sourceName string is invalid, the test just gets ignored instead of failing. This would be really bad if t...
- Modified
- 9 Apr at 04:20