I am using NUnit 2.5, and I want to test a method that recieves several parameters.
Is it reasonable to try to test them using one Test method, with several different TestCases, or will it be harder to maintain (Or just pin point the exact failure) in the long run?
My general idea is to try something like
[TestCase("valid", Result=...
I am trying to run NUnit in Visual Studio 2003 on 64-bit Vista but with no success.
I have set the Debug Mode of the Project to "Program" and the Start Application to "C:\Program Files (x86)\NUnit 2.4.8\bin\nunit.exe". The Test Project is set as the StartUp Project. All the code is in .NET 1.1. Unlike .NET 2.0 the processor architecture...
So' I'm getting in Unit Testing. I created a really simple Function to test it.
public int MultiplyByFive(int x)
{
return x * 5;
}
The Test Method contains
[TestMethod()]
[DeploymentItem("UnitTestApp.exe")]
public void MultiplyByFiveTest()
{
Program_Accessor target = new Program_Accessor()...
Im trying to create a small app using .net 2.0 (client requirements :p), and I have added a reference to the Rhino Mocks dll file, then compiled it using VS2008, all good.
But when I run ant on the project, I get the following error:
[nunit2] SetUp/TearDown Failures:
[nunit2] 1) DocGen.Test.TestDocumentConfigurator : Could not load ...
I have been doing some research on test driven development and find it pretty cool.
One of the things I came across was that when you write your tests, there is an order of execution of your setup and test methods ([Setup] and [Test]).
Are there others that you can use while testing and if so what is the execution order of those, suc...
I'm running a NUnit test over a list of numbers.
My code goes something like this:
numbers = GetListOfNumbers()
foreach number in numbers
Assert.IsTrue(TestNumber(number))
My problem is that NUnit will stop the test on the first number it encounters that doesn't pass the test.
Is there anyway to make NUnit still fail the test ...
I am using the TeamCity VisualStudio sln configuration to drive my CI build. It runs all my NUnit tests - which is all well and great but I don't want TeamCity running any of my tests with the [Category("DatabaseTests")] attribute (since they hit an actual database).
In the NUnit configuration under categories to exclude I put simply ...
I'm trying to load a Visual Studio 2010 beta dll into the NUnit GUI. I get a popup error.
This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. You may be attempting to load an assembly build with a later version of the CLR than the version under which NUnit is currently running.
How do...
I'm using the NUnit GUI version, and it started to get upset at me when I have a test project loaded in there trying to test things. If I make a change in Visual Studio, and then try to rebuild the solution, it throws the error "Unable to copy file obj\Debug\foo.dll to bin\Debug\foo.dll. The process cannot access the file bin\Debug\foo.d...
Hi all,
When I run WatiN tests on our build server they all throw this InteropServices.COMException:
MyTestClassName.MyTestMethodName:
System.Runtime.InteropServices.COMException : Creating an instance of the COM component with CLSID {0002DF01-0000-0000-C000-000000000046} from the IClassFactory failed due to the following error: 8000400...
I'm developing in vs2008, c#, .net 3.5.
I downloaded NUnit 2.5 win / msi version. I have created a [TestFixture] Class containing several [Test] methods.
How do I run the tests?
When I run a NUnit demo solution from Ed Ames, his test .cs files have an icon in the grey column to the left of the code (same place where breakpoints, bo...
One of my methods in an NUnit test checks a Session-State variable :
if (Sesssion[variableName] == null) ...
and the NUnit test is failing with err:
System.Web.HttpException: Session
state can only be used when
enableSessionState is set to true,
either in a configuration file or in
the Page directive. Please also make
s...
How can I do something like this in NUnit?
class Foo
{
int Value { get; set; }
...
}
...
ICollection<Foo> someFoos = GetSomeFoos();
Expect(List.Map(someFoos).Property("Value"), Has.Some.EqualTo(7));
List.Map() only accepts ICollection, not ICollection<T>.
...
Hi
I have multiple NUnit tests, and I would like each test to use a specific app.config file.
Is there a way to reset the configuration to a new config file before each test?
...
I'm working on a web site written using asp.net WebForms. I'd like two wrap test cases around some of the more interesting subroutines. How can I instantiate the class that comes from the .aspx file in my test project so I can manipulate it under nUnit?
...
I was just reading through the Nunit 2.5 docs and came across the [Theory attribute], and I'm having a little bit trouble understanding how this is different to a normal unit test and how it could be used.
What makes it different from a normal test?
What situations would you use this kind of test?
I just can't seem to get my head arou...
Hi,
A bit confused, I was watching some video where some guy was using sqllite as an in-memory database. From the sqllite.org site it seems as though it is a real db?
Can it be both or is the in-memory db that I saw something else? (used with NUnit).
...
I know how to check that a collection is ordered by some property:
Assert.That(actual, Is.Ordered.By("Foo"));
How can I assert that actual contains the elements (1,2,5,3,4) in this specific order (without writing a custom comparer).
...
How do I test, private methods and internal classes using Nunit.
...
Turns out proper process is hard.
I've got two questions that are bugging me in my quest to integrate the above-mentioned tools into my process.
Sandcastle - well, actually, this happened with NDoc as well, so I'm just puzzled. Half the time, when it generates a .chm file, half the links in it are 'dead', or lead to a page not found e...