[Fat-develop] FAT/test/FAT.Test/Core MyOtherStoryFixture.cs,NONE,1.1 TestFixtureLoaderTest.cs,1.1,1.
Brought to you by:
exortech
|
From: <dmc...@us...> - 2004-02-06 20:30:52
|
Update of /cvsroot/fat/FAT/test/FAT.Test/Core In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2365/test/FAT.Test/Core Modified Files: TestFixtureLoaderTest.cs Added Files: MyOtherStoryFixture.cs Log Message: Added string []TestFixtureLoader.GetfixtureNames() which gets a list of all the fixture names in all the assemblies given in the Configuration. --- NEW FILE: MyOtherStoryFixture.cs --- using FAT.Core; using NUnit.Framework; using System; namespace FAT.Test.Core { [FATFixture("myOtherStory")] public class MyOtherStoryFixture : Assertion { } } Index: TestFixtureLoaderTest.cs =================================================================== RCS file: /cvsroot/fat/FAT/test/FAT.Test/Core/TestFixtureLoaderTest.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** TestFixtureLoaderTest.cs 14 Dec 2003 21:30:28 -0000 1.1 --- TestFixtureLoaderTest.cs 6 Feb 2004 20:27:34 -0000 1.2 *************** *** 32,35 **** --- 32,52 ---- ITestFixture fixture = fixtureLoader.GetFixture("theUnknownStory"); } + + [Test] + public void FindFixtureNames() + { + Mock mockConfiguration = new DynamicMock(typeof(IConfiguration)); + mockConfiguration.ExpectAndReturn("Assemblies", new Assembly[] { GetType().Assembly } ); + + ITestFixtureLoader fixtureLoader = new TestFixtureLoader((IConfiguration)mockConfiguration.MockInstance); + string []fixtureNames = fixtureLoader.GetFixtureNames(); + + mockConfiguration.Verify(); + AssertEquals(2, fixtureNames.Length); + Array.Sort(fixtureNames); + AssertEquals("myOtherStory", fixtureNames[0]); + AssertEquals("myStory", fixtureNames[1]); + } + } } |