예제 #1
0
        public void SetUp()
        {
            var runner = TestRunnerBuilder.For(fixturesAre);

            library   = runner.Library;
            templates = new GrammarWriter(library).Build();
        }
예제 #2
0
        public void SetUp()
        {
            test =
                TestUtility.ReadTest(
                    @"
<Test name='some test'>
    <EmbeddedSection>
        <Grammar1 />
        <DoSomeArithmetic>
            <Arithmetic>
                <StartWith starting='100' />
                <MultiplyBy multiplier='2' />
                <TheValueShouldBe expected='200' />
                <Subtract operand='50' />
                <TheValueShouldBe expected='150' />
                <Throw />
                <TheValueShouldBe expected='1' />
            </Arithmetic>
        </DoSomeArithmetic>
        <Grammar2 />
    </EmbeddedSection>

</Test>


");

            runner = TestRunnerBuilder.For(x => x.AddFixturesFromThisAssembly());
        }
예제 #3
0
        public void SetUp()
        {
            var runner = TestRunnerBuilder.For(x =>
            {
                x.AddFixture <MathFixture>();
                x.AddFixture <AnotherFixture>();
                x.AddFixture <DoSomeMathFixture>();
            });

            library = runner.Library;
        }
        public void SetUp()
        {
            test =
                TestUtility.ReadTest(
                    @"
<Test name='a test'>
    <Adding>
        <AddNumbersTogether>
            <Rows>
                <AddNumbersTogether x='1' y='2' sum='3'/>
                <AddNumbersTogether x='3' y='2' sum='5'/>
                <AddNumbersTogether x='2' y='2' sum='4'/>
                <AddNumbersTogether x='5' y='2' sum='7'/>
                <AddNumbersTogether x='10' y='2' sum='12'/>
                <AddNumbersTogether x='1' y='2' sum='4'/>
                <AddNumbersTogether x='3' y='2' sum='3'/>
                <AddNumbersTogether x='1' y='2' sum='3'/>
                <AddNumbersTogether x='1' y='2' sum='3'/>
            </Rows>
        </AddNumbersTogether>
    </Adding>

</Test>
");


            test2 =
                TestUtility.ReadTest(
                    @"
<Test name='a test'>
    <Adding>
        <AddNumbersTable>
            <Rows>
                <AddNumbersTogether2 x='1' y='2' sum='3'/>
                <AddNumbersTogether2 x='3' y='2' sum='5'/>
                <AddNumbersTogether2 x='2' y='2' sum='4'/>
                <AddNumbersTogether2 x='5' y='2' sum='7'/>
                <AddNumbersTogether2 x='10' y='2' sum='12'/>
                <AddNumbersTogether2 x='1' y='2' sum='4'/>
                <AddNumbersTogether2 x='3' y='2' sum='3'/>
                <AddNumbersTogether2 x='1' y='2' sum='3'/>
                <AddNumbersTogether2 x='1' y='2' sum='3'/>
            </Rows>
        </AddNumbersTable>
    </Adding>

</Test>
");


            runner = TestRunnerBuilder.For(x => x.AddFixturesFromThisAssembly());
        }
예제 #5
0
        public void SetUp()
        {
            test = new Test("The First Test");

            test.Section <ArithmeticFixture>(x =>
            {
                x.WithStep("StartWith", "starting:100")
                .WithStep("MultiplyBy", "multiplier:2")
                .WithStep("TheValueShouldBe", "expected:200")
                .WithStep("TheValueShouldBe", "expected:300")
                .WithStep("Subtract", "operand:5")
                .WithStep("Subtract", "")
                .WithStep("TheValueShouldBe", "expected:195")
                .WithStep("Adding", "x:10, y:23.5, returnValue:33.5")
                .WithStep("Throw");
            });


            var runner = TestRunnerBuilder.For(x => x.AddFixturesFromThisAssembly());

            runner.RunTest(test);
        }
예제 #6
0
 public void SetUp()
 {
     runner    = TestRunnerBuilder.For(x => x.AddFixturesFromAssemblyContaining <GrammarMarker>());
     hierarchy = DataMother.GrammarProject().LoadTests();
 }
예제 #7
0
 public static ITestRunner GetRunner()
 {
     return(TestRunnerBuilder.For(x => x.AddFixturesFromThisAssembly()));
 }
예제 #8
0
        public static FixtureLibrary For(Action <FixtureRegistry> configure)
        {
            var runner = TestRunnerBuilder.For(configure);

            return(runner.Library);
        }