I have a collection of unit test that I need to all run from one command line call. One of the assemblies uses a different config file than the rest of the assemblies. Is there a way to specify more than one app config file in one nunit project file?
...
When I first started using unit tests I encountered two problems. First was being able to test private methods and fields and second falling behind on keeping unit tests up to date when rapid development was taking place. Consequently I adopted the approach below for my unit tests.
#if UNITTEST
using NUnit.Framework;
#endif
public clas...
I think that nunit isn't function properly when threading code is involved:
Here's the sample code:
public class multiply
{
public Thread myThread;
public int Counter
{
get;
private set;
}
public string name
{
get;
private set;
}
private Object thisLock = new Object();
...
According to Professional ASP.NET MVC 1.0, page 8, "If you are using VS 2008 Standard Edition or Visual Web Developer 2008 Express you will need to download and install the NUnit, MBUnit or XUnit extensions for ASP.NET MVC in order for [the Create Unit Test Project] dialog to be shown."
Is there such an extension available to download f...
My project generates few values(equal partitioning method) for each data types by getting the Minimum and Maximum values. i am doing this generating values for functional testing ,i am actually passing this values to nunit partner ,max amd min are applicable to int ,float ,double etc ..these values are test data .
Initially i generat...
I am trying to use Dialog handler twice in a function. For first time it executes well but on second time it hangs the system with dialog box open and showing Ok and Cancel butoon but never able to click it. Also it times out with an error "Dialog not available within 60 seconds"
Dim cdhPopup As ConfirmDialogHandler
cdhPopup = New Conf...
There are several tabs in GUI runner of NUnit:
I understand that using Console.WriteLine (...) shows the messages in "Console.Out" tab. My question is what other tabs are for and how can I log messages to them?
[EDIT]
I apologise as I realise that my original question wasn't clear enough. What I intend to do is that create an extensi...
I want to use the new Constraint-based model in NUnit. In which assembly and namespace are the classes defined? (Specificially, I'm looking for the "Is" class and the IConstraint implementations discussed in the documentaton). They do not seem to be in NUnit.Framework.
Also, I'm interested in v2.4.8, which as of this writing is the late...
I am getting started with the notion of test-driven development, and kind of failing since I am finding that I know what the test is going to be kind of, but I can't figure out how to get it to do what I want. What I have is a property that has a public getter and an internal setter. I'd like to test the functionality by accessing the ...
Hi, I would like to switch between NUnit and VS Tests like this:
#if !NUNIT
using Microsoft.VisualStudio.TestTools.UnitTesting;
#else
using NUnit.Framework;
using TestClass = NUnit.Framework.TestFixtureAttribute;
using TestMethod = NUnit.Framework.TestAttribute;
using TestInitialize = NUnit.Framework.SetUpAttribute;
using Test...
I can add an attribute on a test to ignore it
[Test]
[Ignore("Foo Bar")]
Is there anyway to ignore all tests in a file (at the TestFixture level) ?
...
I'm a little confused as to the purpose of the ExpectConstructor() method on the Mock class in TypeMock 3.5.
I would have thought that calling ExpectConstructor would cause the MockManager to fail upon Verify() if the constructor is not called, i.e. if an instance of the mocked type is not instantiated.
However, calling ExpectConstruc...
Which do you prefer?
What are the advantages and disadvantages of each for Unit Testing?
EDIT: I will admit that Team System offers a lot more than just Unit Testing, such as performance and load testing of applications and databases. This question was centering around writing unit tests and which do you prefer.
...
We are working on a C# windows application that is being upgraded from .Net 1.1 to 3.5.
The application uses NUnit for automated testing and we are in turn changing this to Team System 2008.
It seems to me that NUnit uses
similar attributes and code for
assertion?
What is the best way to upgrade /
migrate this code and are their any
pr...
How can I configure a .NET solution (C#, .NET 2.0) to to allow other developers to make use of the same unit tests for the solution using either NUnit or MSTest?
Background:
In this project, some developers use VS2005 Team Edition, and others make use of VS2005 Pro, so not all of the developers are able to run MSTest. Given that this...
When you right click on a method in a code file in Visual Studio 2008 you get this
which creates the unit test skeleton for that method.
Is there a way (by means of a template change or some nifty hack) by which I can change this to create unit tests based on Nunit rather than Visual Studio unit testing tools?
Something like this…
...
I am getting this error when trying to set an expectation on an object I mocked that inherits from MembershipUser:
ContactRepositoryTests.UpdateTest : FailedSystem.InvalidProgramException: JIT Compiler encountered an internal limitation.
Server stack trace:
at MockObjectType1.ToString()
Exception rethrown at [0]:
at System.Runtime....
During execution of tests on ccnet server. Some of the tests fails saying Timeout while Internet Explorer busy and hangs the system and at the end show the old results-xml file in nunit results even I am using a clean build.
...
Does anyone have any advice/information on how to install nUnit with ASP.Net MVC? I have seen previous posts which related to the preview releases and involved a ghoulish nightmare of having to create template files, run command prompt and even mess with the registry.
Obviously this is far from ideal and given Microsoft's intention to ...
Is there a way to find out the project path at compile time?
I want to create a unit test that tests if the configurartion in the default web.config (the one in the project folder). Mainly to reduce human error.
I cannot rely on assembly locations at runtime (for the test), so I need to know where the project folder is to access web.c...