Example #1
0
 public void DiscoverTests(ConeTestNamer names)
 {
     var testSink = new ConePadTestMethodSink(names, this);
     testSink.TestFound += (thunk, args, result) => AddTest(thunk.TestNameFor(Name, args), thunk, args, result);
     var setup = new ConeFixtureSetup(GetMethodClassifier(fixture.FixtureMethods, testSink));
     setup.CollectFixtureMethods(Fixture.FixtureType);
 }
Example #2
0
 public void GetFixtureMethods()
 {
     FixtureMethods = new ConeFixtureMethods();
     var testSink = new Mock<IConeTestMethodSink>().Object;
     var setup = new ConeFixtureSetup(new ConeMethodClassifier(FixtureMethods, testSink));
     setup.CollectFixtureMethods(typeof(DerivedFixture));
 }
Example #3
0
 public void DiscoverTests(ConeTestNamer names)
 {
     WithTestMethodSink(names, testSink =>
     WithFixtureMethodSink(fixtureSink => {
         var setup = new ConeFixtureSetup(new ConeMethodClassifier(fixtureSink, testSink));
         setup.CollectFixtureMethods(fixture.FixtureType);
     }));
 }
Example #4
0
 public void are_classified_only_once()
 {
     var methods = new ConeFixtureMethods();
     var testSink = new Mock<IConeTestMethodSink>().Object;
     var setup = new ConeFixtureSetup(new ConeMethodClassifier(methods, testSink));
     setup.CollectFixtureMethods(typeof(DerivedFixture));
     Check.That(() => methods.BeforeEach.Count == 1);
 }