Exemplo n.º 1
0
        public void Except_WithTestCases_ProducesExpectedResults(int valueToOmmit, string expected)
        {
            IEnumerable <int> collection = Enumerable.Range(0, 10);

            var values = CollectionExtensions.Except(collection, valueToOmmit);
            var output = string.Join(",", values);

            Assert.That(output, Is.EqualTo(expected));
        }
Exemplo n.º 2
0
        public void Except_NullCollection_ThrowsArgumentNullException()
        {
            IEnumerable <int> collection = null;

            Assert.Throws <ArgumentNullException>(() => CollectionExtensions.Except(collection, 5));
        }