Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BizObj and Test Driven Dev.
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
00839569
Message ID:
00839811
Vues:
37
I am using NUnit. I created a new solution that had one project that containted my unit tests and added the existing business object project to the solution. I added a reference to the existing winform app.config to the unit test project so there is only one app.config to maintain. There are probably many other ways to accomplish the same thing. I created a separate solution because I am the only one on the team using NUnit so I didn't want to force everyone else to install it. It might be more convenient to keep unit tests and business object in the same project if everyone on your team is using NUnit.

My unit test main program looks like this:
public static mmAppDesktop App;

static void Main() 
{
	App = new mmAppDesktop();
	Tester tester = new Tester();
	tester.RunOrderDetailComponent();
	tester.RunOffer();
	tester.RunShipType();
	tester.RunTerms();
	tester.RunPriceTable();
	tester.RunOfferDetail();
	tester.RunBomHeaders();
	tester.RunBomDetail();
}
and my tester looks something like this:
[Test]
public void RunOffer()
{
	Offer offer = new Offer();
	Assertion.AssertEquals("Offers", offer.TableName);
	offer.GetOfferById("ID000019");
	Assertion.AssertEquals(1, offer.GetCurrentDataSet().Tables.Count);
	Console.Write(offer.GetCurrentDataSet().GetXml());
}
Of course, all your references have to be in place.


>I'm experimenting with TDD using NUnit. I notice that the app.config file is not added to a project in the quickstart until the windows form is created. Is there any way that the Bizobj can stand on its own? Do I need to manually add the app.config, and can the Windows form and the Bizobj share the app.config?
>
>Mike
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform