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)); }
public void Except_NullCollection_ThrowsArgumentNullException() { IEnumerable <int> collection = null; Assert.Throws <ArgumentNullException>(() => CollectionExtensions.Except(collection, 5)); }