Esempio n. 1
0
        internal void Remove(int index)
        {
            var action = new RemoveCaseAction(new[] { Variables.ElementAt(index) });

            action.Execute(testCaseCollectionManager.CurrentScope);
            Reload();
            OnPropertyChanged("Variables");
        }
Esempio n. 2
0
        public void Execute_FirstColumn_ColumnRemoved()
        {
            var state = new GenerationState();

            state.CaseCollection.CurrentScope.Content.Columns.Add("firstColumn");
            state.CaseCollection.CurrentScope.Content.Columns.Add("secondColumn");
            state.CaseCollection.CurrentScope.Content.Columns.Add("thirdColumn");

            var action = new RemoveCaseAction(new[] { "firstColumn" });

            action.Execute(state);
            Assert.That(state.CaseCollection.CurrentScope.Content.Columns, Has.Count.EqualTo(2));
        }
Esempio n. 3
0
        public void Display_FirstAndThirdColumns_ColumnsRemoved()
        {
            var state = new GenerationState();

            state.CaseCollection.CurrentScope.Content.Columns.Add("firstColumn");
            state.CaseCollection.CurrentScope.Content.Columns.Add("secondColumn");
            state.CaseCollection.CurrentScope.Content.Columns.Add("thirdColumn");

            var action = new RemoveCaseAction(new List <string>()
            {
                "firstColumn", "thirdColumn"
            });

            Assert.That(action.Display, Is.EqualTo("Removing columns 'firstColumn', 'thirdColumn'"));
        }
Esempio n. 4
0
        public void Execute_FirstColumn_ColumnRemoved()
        {
            var state = new GenerationState();

            state.TestCaseCollection.Scope.Content.Columns.Add("firstColumn");
            state.TestCaseCollection.Scope.Content.Columns.Add("secondColumn");
            state.TestCaseCollection.Scope.Content.Columns.Add("thirdColumn");
            var firstRow = state.TestCaseCollection.Scope.Content.NewRow();

            state.TestCaseCollection.Scope.Variables.Add("firstColumn");
            state.TestCaseCollection.Scope.Variables.Add("secondColumn");
            state.TestCaseCollection.Scope.Variables.Add("thirdColumn");

            var action = new RemoveCaseAction("firstColumn");

            action.Execute(state);
            Assert.That(state.TestCaseCollection.Scope.Content.Columns, Has.Count.EqualTo(2));
        }
Esempio n. 5
0
        public void Display_FirstColumn_CorrectMessage()
        {
            var action = new RemoveCaseAction(new[] { "firstColumn" });

            Assert.That(action.Display, Is.EqualTo("Removing column 'firstColumn'"));
        }