public void NotInRange() { int minValue = 1; int maxValue = 10; Assert.ThrowsExact <ArgumentNullException>(() => Assert.NotInRange <string>(null, "z", "z")); Assert.ThrowsExact <ArgumentNullException>(() => Assert.NotInRange <string>("a", null, "z")); Assert.ThrowsExact <ArgumentNullException>(() => Assert.NotInRange <string>("a", "z", null)); Assert.ThrowsExact <AssertionException>(() => Assert.NotInRange(2, minValue, maxValue)); Assert.ThrowsExact <AssertionException>(() => Assert.NotInRange(minValue, minValue, maxValue)); Assert.ThrowsExact <AssertionException>(() => Assert.NotInRange(maxValue, minValue, maxValue)); Assert.DoesNotThrow(() => Assert.NotInRangeEqual(minValue - 5, minValue, maxValue)); Assert.ThrowsExact <AssertionException>(() => Assert.NotInRangeEqual(minValue + 5, minValue, maxValue)); Assert.ThrowsExact <AssertionException>(() => Assert.NotInRangeEqual(maxValue - 5, minValue, maxValue)); Assert.DoesNotThrow(() => Assert.NotInRangeEqual(maxValue + 5, minValue, maxValue)); }