Exemple #1
0
        public void Execute_SecondColumnSubstitutueWithValue_ValueTrimmed()
        {
            var state = BuildInitialState();

            var action = new TrimCaseAction(new string[] { "secondColumn" }, DirectionType.Both);

            action.Execute(state);
            Assert.That(state.CaseCollection.CurrentScope.Content.Rows[0]["secondColumn"], Is.EqualTo("secondCell1"));
            Assert.That(state.CaseCollection.CurrentScope.Content.Rows[1]["secondColumn"], Is.EqualTo("(none)"));
        }
Exemple #2
0
        public void Execute_FirstColumnRightTrimWithValue_ValueTrimmed()
        {
            var state = BuildInitialState();

            var action = new TrimCaseAction(new string[] { "firstColumn" }, DirectionType.Right);

            action.Execute(state);
            Assert.That(state.CaseCollection.CurrentScope.Content.Rows[0]["firstColumn"], Is.EqualTo("Cell"));
            Assert.That(state.CaseCollection.CurrentScope.Content.Rows[1]["firstColumn"], Is.EqualTo("Cell"));
        }
Exemple #3
0
        public void Execute_AllColumnsTrim_ValueTrimmed()
        {
            var state = BuildInitialState();

            var action = new TrimCaseAction(new string[] {}, DirectionType.Both);

            action.Execute(state);
            Assert.That(state.CaseCollection.CurrentScope.Content.Rows[0]["firstColumn"], Is.EqualTo("Cell"));
            Assert.That(state.CaseCollection.CurrentScope.Content.Rows[0]["secondColumn"], Is.EqualTo("secondCell1"));
            Assert.That(state.CaseCollection.CurrentScope.Content.Rows[0]["thirdColumn"], Is.EqualTo("Text"));

            Assert.That(state.CaseCollection.CurrentScope.Content.Rows[1]["firstColumn"], Is.EqualTo("Cell"));
            Assert.That(state.CaseCollection.CurrentScope.Content.Rows[1]["secondColumn"], Is.EqualTo("(none)"));
            Assert.That(state.CaseCollection.CurrentScope.Content.Rows[1]["thirdColumn"], Is.EqualTo(""));
        }