NUnit tests will not load


J

j

I've used NUnit before, but I've never had this problem.
I am trying to test a web service.
I've written my tests, decorated the fixture, and the tests and
everything compiles, but when I load the DLL into NUnit, none of the
tests load.
The console output :

NUnit version 2.2.9
Copyright (C) 2002-2003 James W. Newkirk, Michael C. Two, Alexei A.
Vorontsov, Charlie Poole.
Copyright (C) 2000-2003 Philip Craig.
All Rights Reserved.
OS Version: Microsoft Windows NT 5.1.2600 Service Pack 2 .NET
Version: 2.0.50727.42
Tests run: 0, Failures: 0, Not run: 0, Time: 0.000 seconds

The GUI just highlights the assembly with yellow.

Any help would be greatly appreciated.



My test code:
namespace Tests.TrailerList
{
using NUnit.Framework;

[TestFixture]
class TrailerListTests
{
private TrailerListCriteria tlc;

public TrailerListTests() { }

[SetUp]
public void Init()
{
tlc = new TrailerListCriteria();
tlc.Scac = "ZUMQ";
tlc.Site = "0198";
tlc.StartDate = new DateTime(2002, 7, 23);
tlc.EndDate = new DateTime(2004, 7, 29);
}

[Test]
public void TestTrailerListDS()
{
TrailerListWS tl = new TrailerListWS();
DataSet ds = tl.GetTrailerListDS(tlc);
Assert.IsNotNull(ds);
Assert.AreEqual(233, ds.Tables[0].Rows.Count);
}

[Test]
public void TestTrailerList()
{
TrailerListWS tl = new TrailerListWS();
TrailerRow[] Rows;
Rows = tl.GetTrailerList(tlc);
Assert.IsNotNull(Rows);
Assert.AreEqual(233, Rows.Length);
}

[Test]
public void TestColumnList()
{
TrailerListWS tl = new TrailerListWS();
Column[] Rows;
Rows = tl.GetColumnList();
Assert.IsNotNull(Rows);
Assert.AreEqual(233, Rows.Length);
}
}
 
Ad

Advertisements

Ad

Advertisements

J

j

D'OH!


thanks!!!

The class has to be public.
I've used NUnit before, but I've never had this problem.
I am trying to test a web service.
I've written my tests, decorated the fixture, and the tests and
everything compiles, but when I load the DLL into NUnit, none of the
tests load.
The console output :

NUnit version 2.2.9
Copyright (C) 2002-2003 James W. Newkirk, Michael C. Two, Alexei A.
Vorontsov, Charlie Poole.
Copyright (C) 2000-2003 Philip Craig.
All Rights Reserved.
OS Version: Microsoft Windows NT 5.1.2600 Service Pack 2 .NET
Version: 2.0.50727.42
Tests run: 0, Failures: 0, Not run: 0, Time: 0.000 seconds

The GUI just highlights the assembly with yellow.

Any help would be greatly appreciated.



My test code:
namespace Tests.TrailerList
{
using NUnit.Framework;

[TestFixture]
class TrailerListTests
{
private TrailerListCriteria tlc;

public TrailerListTests() { }

[SetUp]
public void Init()
{
tlc = new TrailerListCriteria();
tlc.Scac = "ZUMQ";
tlc.Site = "0198";
tlc.StartDate = new DateTime(2002, 7, 23);
tlc.EndDate = new DateTime(2004, 7, 29);
}

[Test]
public void TestTrailerListDS()
{
TrailerListWS tl = new TrailerListWS();
DataSet ds = tl.GetTrailerListDS(tlc);
Assert.IsNotNull(ds);
Assert.AreEqual(233, ds.Tables[0].Rows.Count);
}

[Test]
public void TestTrailerList()
{
TrailerListWS tl = new TrailerListWS();
TrailerRow[] Rows;
Rows = tl.GetTrailerList(tlc);
Assert.IsNotNull(Rows);
Assert.AreEqual(233, Rows.Length);
}

[Test]
public void TestColumnList()
{
TrailerListWS tl = new TrailerListWS();
Column[] Rows;
Rows = tl.GetColumnList();
Assert.IsNotNull(Rows);
Assert.AreEqual(233, Rows.Length);
}
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top