Exemplo n.º 1
0
        public void Execute_NothingToDropEvenIfText_NothingDropped()
        {
            var list = new List <object>()
            {
                "1", "3", "5"
            };
            var strategy = new DropStrategy(ColumnType.Numeric);

            Assert.That(strategy.Execute(list).Count, Is.EqualTo(3));
        }
Exemplo n.º 2
0
        public void Execute_NothingToDrop_SameValues()
        {
            var list = new List <object>()
            {
                1, 3, 5
            };
            var strategy = new DropStrategy(ColumnType.Numeric);

            Assert.That(strategy.Execute(list), Has.Member(1));
            Assert.That(strategy.Execute(list), Has.Member(3));
            Assert.That(strategy.Execute(list), Has.Member(5));
        }
Exemplo n.º 3
0
        public void Execute_NumericForText_NullDroppedButNumericHeld()
        {
            var list = new List <object>()
            {
                "foo", "bar", 1, null
            };
            var strategy = new DropStrategy(ColumnType.Text);

            Assert.That(strategy.Execute(list).Count, Is.EqualTo(3));
            Assert.That(strategy.Execute(list), Has.Member("foo"));
            Assert.That(strategy.Execute(list), Has.Member("bar"));
            Assert.That(strategy.Execute(list), Has.Member("1"));
        }
Exemplo n.º 4
0
        public void Execute_Null_NullDropped()
        {
            var list = new List <object>()
            {
                1, 3, 5, null
            };
            var strategy = new DropStrategy(ColumnType.Numeric);

            Assert.That(strategy.Execute(list).Count, Is.EqualTo(3));
            Assert.That(strategy.Execute(list), Has.Member(1));
            Assert.That(strategy.Execute(list), Has.Member(3));
            Assert.That(strategy.Execute(list), Has.Member(5));
        }