First off I was wondering whether it's possible to implement a functionality with Nunit where each time a project is created in Visual Web Developer 2010 I get a dialog asking whether I want to create a unit test project for current application like I saw it happen in the older versions of Visual Web Developer.
I've tried just about eve...
Hi all,
I've installed NCover 3.4 on my CruiseControl 1.5 and after some tinking, I've got the coverage reports shown in my cleanly installed CC.
I can't see the test results however (and never could after installing CC Net 1.5, as I recall 1.4 it 'just worked').
How do I get the unit test results from NCover displayed in CC.net? (NUn...
Hi All,
I am looking to write some integration tests to compare the WSDL generated by WCF services against previous (and published) versions. This is to ensure the service contracts don't differ from time of release.
I would like my tests to be self contained and not rely on any external resources such as hosting on IIS.
I am thinking...
To integrate with the current system for continuous integration, we want to use NUnit for testing (non UI) Silverlight code. Doing this means executing Silverlight code using the runtime of the full .NET framework which usually works just fine as long as not actually using Silverlight specific classes such as the visual elements or Depen...
Hello,
Using Windows 7 32 bit, VS 2010, .NET 4 DLL, NUnit (2.5.5) to unit test the application. I'm currently getting the following error; seen plenty of posts and tried the following:
restart machine
restart VS
delete bin/obj and reload
clean/rebuild
But I cannot get NUnit to hit my breakpoints when running;
I set the NUNit test ...
I need to create some unit tests that confirm that instance of a class responds appropriately to an event raised by another object. Passing in a mock of the 'watched' object is easy enough, but as far as I can tell, mocks in nunit don't provide a means of having the mock raise an event.
I'm considering using reflection to directly invok...
When I use the NUnitExtension.RowTest.dll it ignores my tests in Resharper/VS2008 and Gallio Icarus. Does anyone have a config that works?
[RowTest]
[Row(5, 6, 11)]
public void Should_Do_RowTest(int a, int b, int expected)
{
Assert.AreEqual(a+b, expected);
}
...
Hi there, i'm new in web dev and have following questions
I have Web Site project. I have one datacontext class in App_Code folder which contains methods for working with database (dbml schema is also present there) and methods which do not directly interfere with db. I want to test both kind of methods using NUnit.
As Nunit works with...
I am learning how to use NUnit to test some scripts written within asp.net in c#. Does anyone know how to tell if the script has pass/failed on NUnit, as in what the test result output is.
Or does anyone know any good websites, where I can read up on learning how to use NUnit?
...
Is there a hook in NUnit to execute code only when assertion fails without catching the exception itself. Basically, it should accept action delegate to be executed when assertion fails and then re-throw exception. Why do I need this?
I need to compare two objects and dump the result on the screen, for easier debugging, when assertion fa...
If you have NUnit integration tests that test access to the database, how do I run those tests on a build machine where the target database is on a different server.
It's almost like I want to run the integration tests from the build server (using CruiseControl) but have the tests run on the target server so I can exercise the database ...
I'm hopefully going to be deploying an application soon, and I find it strange that I would have to include nunit.framework.dll. After all, the user is not going to need to run unit tests! So the only thing I can think of is that there is some way of configuring my solution for Debug and Release, such that Debug references NUnit, while...
I can't find out what's the problem. I haven't found any documentation on AssertWasCalled on Rhino.Mocks site, so I have to ask the question here.
What I do in my tests is I call _mocks.ReplayAll(), then one or more _mockedObject.AssertWasCalled() and then _mocks.VerifyAll(). But it tells me that "This action is invalid when the mock ob...
If I create an IDisposable during the TestFixtureSetup of an NUnit test, and the test throws an unanticipated exception (e.g. external resource fails), will the IDisposable's Dispose() get called?
Added>>
If not, does NUnit provide guaranteed execution of TestFixtureTearDown or somewhere else that can be used for cleanup?
...
Hi, I'm learning TDD with VB.NET and NUnit. I want to know what's the best thing to do: Use a lot of Assert methods inside of a test method or use a assert per method?
This is my code. Thank you.
Imports NUnit.Framework
<TestFixture()> _
Public Class CalculatorTest
<Test()> _
Public Sub TestAdd()
Dim calculator As Calculator = New...
I'm trying to set up some Moq repositories to test my service with Castle Windsor as my IOC. Mu service depends on IFoo, so I'm creating a moq instance that implements IFoo and injecting it into the container like so:
_container.AddComponent("AutoBill",
typeof (AutoBillService), typeof (AutoBillService));
var mockUserRepository = n...
Can anyone sugggest good references/guides for getting started with nunit and visual studio 2008. (Apart from the Nunit documentation itself!). I specifically want to set up a test project in vs 2008.
...
Hi All,
I am newbie to moq and unit testing. So, I don't understand it thoroughly. pardon me if question is stupid. please help me understand the following scenario.
Following is my simple test
[Test]
public void TryMoq() {
var mock = new Mock<IDummyInterface>();
var dummy = new DummyClass(mock.Object);
mock.VerifySet(m =...
Can't figure out why my nunit tests fail when i call the .dll files individually however when i call the below .nunit file through nunit-console-x86.exe
I suspect it has something to do with the config file. Some of these test require configuration information from this config file. Some do not, and it seems that the ones that don't, pa...
Hi,
we use the nunit.exe application to run our (integration)test
Now i experience the problem that the connectionstring is not picked up from the app.config from the dll where the testcode is in.
That sounds logical because the nunit.exe is the starting app and not the test dll (it used to work when i started the tests from the visua...