Beispiel #1
0
    Test CreateTests(Type fixtureType, IEnvironment environment)
    {
        var fixture = new ScenarioTestFixture(fixtureType);

        CreateFixtureInstanceWithEnvironment(fixture, environment);
        foreach (var method in fixtureType.GetMethods(BindingFlags.Public | BindingFlags.Instance).Where(x => x.DeclaringType != typeof(object) && x.Name.Contains("_")))
        {
            var testMethod = new ScenarioTestMethod(method);
            testMethod.Parent  = fixture;
            testMethod.Fixture = fixture.Fixture;
            fixture.Tests.Add(testMethod);
        }
        return(fixture);
    }
 Test CreateTests(Type fixtureType, IEnvironment environment)
 {
     var fixture = new ScenarioTestFixture(fixtureType);
     CreateFixtureInstanceWithEnvironment(fixture, environment);
     foreach (var method in fixtureType.GetMethods(BindingFlags.Public | BindingFlags.Instance).Where(x => x.DeclaringType != typeof(object) && x.Name.Contains("_")))
     {
         var testMethod = new ScenarioTestMethod(method);
         testMethod.Parent = fixture;
         testMethod.Fixture = fixture.Fixture;
         fixture.Tests.Add(testMethod);
     }
     return fixture;
 }