We have several hundred test classes, with a few dozen of them marked with the following attributes:
[TestFixture]
[Explicit]
[Category("IntegrationTests")]
so they will only be run in our over-night automated build. The remaining TestFixtures don't have a Category specified (and are not marked Explicit either).
Here is the...
Maybe I am just forgetting something, but I cannot seem to get NUnit to work in Visual Studio 2008 Standard Edition. I am trying to use NUnit 2.5.7 in a C# class library project. I am following the structure of the samples given in the download of NUnit.
Here are the steps I am doing
1) Download and install NUnit 2.5.7
2) Create C# cl...
I'm getting an error (see bottom of post) when running NUnit against a production code assembly. The production code assembly has a reference to a third party framework that uses log4net internally (Specifically, this is SimplyAccounting's SDK). The version of log4net that it uses is 1.2.9.0. Outside of this third party framework which w...
Roy Osherove, author of The Art Of Unit Testing, has commented on a blog that of the many things NUnit supposedly does better, it being much faster is one of them.
My question is how much faster though, if at all? Are we talking an order of magnitude? 10%? 50%?
I'm asking this because for the moment I can't compare the two. I am tryin...
I'm struggling to make an assertion about the absence of a particular item in an enumeration. Specifically, this is what my test looks like:
// Take an item from a queue of scheduled items...
ItemQueue pendingQueue = schedule.PendingItems; // PendingItems is an IEnumerable<int>
int item = pendingQueue.FirstItem;
// ...process the item....
Hi All,
I am posting this query with lot of hope.
I have created a framework using Selenium RC with C#,Nunit and NANT.
and Implement Nunit2Report for converting XML report output from Nunit
to HTML format.
But the HTML report are not clear as we used to get using TestNG and
LoggingSelenium (Selenium Java Framework).
My Query:
...
I'm finding myself needing a lot of this sort of logic lately:
Assert.That(collection.Items, Has.Member(expected_item));
Assert.That(collection.Items.Count(), Is.EqualTo(1));
I see that NUnit offers Has.Some and Has.All, but I don't see anything like Has.One. What's the best way to accomplish this without two asserts?
...
I am trying to use moles with NUnit and am getting the following error "Moles requires tests to be an instrumented process". I am also using Visual NUnit within Visual Studio 2008 to get this working. Any help is welcome.
...
Is there a way to create unit tests that can be run with the Visual Studio Unit Testing Framework as well as NUnit? I personally prefer the Visual Studio one, but the build server I am using only does NUnit, so I would like to support both if possible.
EDIT: To clarify, I would like to run my own tests using Visual Studio (without add-o...
I've got the default route set-up:
public static void RegisterRoutes(RouteCollection routes)
{
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
routes.MapRoute(
"Shortie", // Route name
"{controller}/{id}", // URL with parameters
new { controller = "Ettan", action = "Index", id = "id" } // P...
I'm getting the exception
The type initializer for 'Moq.Mock`1'
threw an exception.
using Moq 4.0 I've checked around on a couple of forums and they allude to using the Moq-NoCastle version. I've tried both this and version in the Moq folder. Both with the same result.
I've got a solution with 2 projects, one for my interface...
Suppose I have a class library cl1 and a unit test for it that is called clt1. I can use Visual Studio's Attach to Process feature to attach to NUnit runner. This lets me debug cl1, for example set break points. It's a very helpful feature for debugging.
I'm in a need of this technique in Visual Studio and IE/FF. Suppose I have a web ap...
I have custom event logger, and I want to test it.
[Test]
public void AddLogWithExceptionAndEventLogEntryTypeTest()
{
const string loggerName = "mockLoggerName";
var logger = new MyLogger(loggerName);
System.Diagnostics.EventLog log = new System.Diagnostics.EventLog("System");
string log...
Hi.
Debugging unit tests with the NUnit 2.5.3 framework causes a crash on my machine.
var app = new Application();
throws an exception
System.EntryPointNotFoundException occurred
Message=Unable to find an entry point named 'nonexistent_dummy' in DLL 'MSVCR80.dll'.
Source=PresentationCore
TypeName=""
StackTrace:
at non...
My team is currently using CppUnit for all our unmanaged C++ unit tests but I'm toying with the idea of transitioning to NUnit through either GenTestAsm (pure C#) or C++/CLI. Either way, what consequences would I face on the Code Coverage front with either of these approaches?
We currently use PureCoverage to instrument our unmanaged...
The following test works fine with .Net 3.5 + NUnit 2.4.8. But the same tests does not work using .Net 4.0 + Nunit 2.5.7.10213.
/// <summary>
/// This test fails with unexpected exception:
/// System.InvalidCastException : Unable to cast object of type
/// 'System.Security.Principal.GenericPrincipal' to type
/// 'System.Secur...
I'm new to both Monotouch and Monodevelop. Trying to get started with NUnit and I'm having a lot of trouble -- none of the sketchy references I can find on line seem to match what I'm seeing in the UI (MonoDevelop 2.4 on Mac OS 10.6). I've tried:
Adding an "NUnit assembly test collection" project to my solution.
Adding an "Empty MonoTo...
I vaguely remember reading "something" "somewhere" about using Trace.WriteLine over Console.Out.WriteLine in nUnit possibly in the context of reSharper or TeamCity but I cannot remember the details.
Therefore the question is either in the context of nUnit running separately or within reSharper/TeamCity is there any benefit of using one ...
Hi.
I'm using Watin and Nant to create unit tests for my web site.
I want to know the way how to test content of the popup IE window.
That window is opening when user clicks on the link that has target="_blank", like on the example below
<p>
... receives oversight and governance from the
<a target="_blank" href="ihealth.html">iHealth...
I'm trying to write a unit test for some code that programmatically creates UIButtons, but when I call this code from the test, I get a NullReferenceException. Stepping through in the debugger, it looks like UIButton.FromType() returns null.
Here's the method I'm testing:
public UIButton makeButton (String title, Action<IWelcomeCon...