Esempio n. 1
0
        public void RemoveNull()
        {
            // Setup
            var sequence = InitializeSequence();
            var set      = new TestSet <SimpleType>(sequence);

            // Execute
            var result = set.Remove(a_entity: null);

            // Assert
            Assert.IsFalse(result);
            Assert.AreEqual(sequence.Length, set.Count);
        }
Esempio n. 2
0
        public void RemoveEntity()
        {
            // Setup
            var sequence    = InitializeSequence();
            var removedItem = sequence[1];
            var set         = new TestSet <SimpleType>(sequence);

            // Execute
            var result = set.Remove(removedItem);

            // Assert
            Assert.IsTrue(result);
            Assert.AreEqual(sequence.Length - 1, set.Count);
        }
Esempio n. 3
0
        public void RemoveNonexistingEntity()
        {
            // Setup
            var sequence    = InitializeSequence();
            var removedItem = new SimpleType {
                Name = "NoExisty", Price = 0m, Value = 1000000
            };
            var set = new TestSet <SimpleType>(sequence);

            // Execute
            var result = set.Remove(removedItem);

            // Assert
            Assert.IsFalse(result);
            Assert.AreEqual(sequence.Length, set.Count);
        }
Esempio n. 4
0
        public void RemoveNull()
        {
            // Setup
            var sequence = InitializeSequence();
            var set = new TestSet<SimpleType>(sequence);

            // Execute
            var result = set.Remove(a_entity: null);

            // Assert
            Assert.IsFalse(result);
            Assert.AreEqual(sequence.Length, set.Count);
        }
Esempio n. 5
0
        public void RemoveNonexistingEntity()
        {
            // Setup
            var sequence = InitializeSequence();
            var removedItem = new SimpleType { Name = "NoExisty", Price = 0m, Value = 1000000 };
            var set = new TestSet<SimpleType>(sequence);

            // Execute
            var result = set.Remove(removedItem);

            // Assert
            Assert.IsFalse(result);
            Assert.AreEqual(sequence.Length, set.Count);
        }
Esempio n. 6
0
        public void RemoveEntity()
        {
            // Setup
            var sequence = InitializeSequence();
            var removedItem = sequence[1];
            var set = new TestSet<SimpleType>(sequence);

            // Execute
            var result = set.Remove(removedItem);

            // Assert
            Assert.IsTrue(result);
            Assert.AreEqual(sequence.Length - 1, set.Count);
        }