public void Contains() { Assert.ThrowsExact <ArgumentNullException>(() => Assert.Contains <int>(null, 1)); Assert.ThrowsExact <ArgumentNullException>(() => Assert.Contains("ABC", 'c', null as IEqualityComparer <char>)); Assert.ThrowsExact <ArgumentException>(() => Assert.Contains <int>(new int[] { }, 1)); Assert.ThrowsExact <AssertionException>(() => Assert.Contains(new int[] { 2 }, 1)); Assert.DoesNotThrow(() => Assert.Contains(new int[] { 2 }, 2)); Assert.DoesNotThrow(() => Assert.Contains("ABC", 'c', new CharCaseInvariantComparer())); Assert.ThrowsExact <AssertionException>(() => Assert.Contains("ABC", 'd', new CharCaseInvariantComparer())); }