Exemplo n.º 1
0
        public void Execute_EmptyDataTable_Rendered()
        {
            var state = BuildInitialState("b");

            state.TestCaseCollection.Scope.Content.Rows.Clear();
            var action = new GenerateSuiteAction(false);

            action.Execute(state);

            Assert.That(state.List.Tests, Has.Count.EqualTo(0));
        }
Exemplo n.º 2
0
        public void Execute_SimpleDataTable2_Rendered()
        {
            var state  = BuildInitialState("foo");
            var action = new GenerateSuiteAction(false);

            action.Execute(state);

            Assert.That(state.List.Tests, Has.Count.EqualTo(1));
            var test = state.List.Tests[0];

            Assert.That(test.Name, Is.EqualTo("a + foo"));
        }
Exemplo n.º 3
0
        public void Execute_ComplexDataTable_Rendered()
        {
            var state  = BuildInitialState(new [] { "b", "c" });
            var action = new GenerateSuiteAction(false);

            action.Execute(state);

            Assert.That(state.List.Tests, Has.Count.EqualTo(1));
            var test = state.List.Tests[0];

            Assert.That(test.Name, Is.EqualTo("a + bc"));
        }
Exemplo n.º 4
0
        public void Execute_ManyActions_SuiteGenerated()
        {
            var state = new GenerationState();

            var loadCase = new LoadCaseFromFileAction(CsvFilename);

            loadCase.Execute(state);

            var loadTemplate = new LoadEmbeddedTemplateAction("ExistsDimension");

            loadTemplate.Execute(state);

            var generateSuite = new GenerateSuiteAction(false);

            generateSuite.Execute(state);

            var saveSuite = new SaveSuiteAction(TargetFilename);

            saveSuite.Execute(state);

            Assert.That(File.Exists(TargetFilename));
        }