public void RangeIIOutTest() { var result = RunTest(Int.Range(0, int.MaxValue, out var value), () => MyClass.M1(value)); Assert.That(result, Is.EqualTo(value)); }
public void Range_MinGreaterThanMax() { // Act & Assert Assert.Throws(typeof(ArgumentException), // ReSharper disable once ObjectCreationAsStatement () => Int.Range(20, 10)); }
public void Range_MinLowerThanMax() { // Act var range = Int.Range(10, 20); // Assert AssertChunks(range, 10, 20); }
public void Range_MinEqualToMax() { // Act var range = Int.Range(10, 10); // Assert AssertChunks(range, 10, 10); }
public void RangeIITestOutTwice() { var result = RunTest(Int.Range(1, int.MaxValue) .Range(int.MinValue, -1, out var value), () => MyClass.M2(value)); Assert.That(result, Is.EqualTo(value)); }
public void AddChunk_Error() { // Arrange var range = Int.Range(10, 20); // Assume AssertChunks(range, 10, 20); // Act & Assert Assert.Throws(typeof(ArgumentException), // ReSharper disable once ObjectCreationAsStatement () => range.Range(20, 10)); }
public void AddChunk_AfterMaxInfinity() { // Arrange var range = Int.Range(10, 20); // Assume AssertChunks(range, 10, 20); // Act range.Range(30, int.MaxValue); // Assert AssertChunks(range, 10, 20, 30, int.MaxValue); }
public void AddChunk_AfterMax() { // Arrange var range = Int.Range(10, 20); // Assume AssertChunks(range, 10, 20); // Act range.Range(30, 40); // Assert AssertChunks(range, 10, 20, 30, 40); }
public void AddChunk_MaxImmediatelyAfterMax() { // Arrange var range = Int.Range(10, 20); // Assume AssertChunks(range, 10, 20); // Act range.Range(15, 21); // Assert AssertChunks(range, 10, 21); }
public void AddChunk_ContainingMax() { // Arrange var range = Int.Range(10, 20); // Assume AssertChunks(range, 10, 20); // Act range.Range(12, 25); // Assert AssertChunks(range, 10, 25); }
public void AddChunk_BetweenMinMax() { // Arrange var range = Int.Range(10, 20); // Assume AssertChunks(range, 10, 20); // Act range.Range(12, 14); // Assert AssertChunks(range, 10, 20); }
public void AddChunk_MinImmediatelyBeforeMin() { // Arrange var range = Int.Range(10, 20); // Assume AssertChunks(range, 10, 20); // Act range.Range(9, 15); // Assert AssertChunks(range, 9, 20); }
public void AddChunk_ContainingMin() { // Arrange var range = Int.Range(10, 20); // Assume AssertChunks(range, 10, 20); // Act range.Range(5, 14); // Assert AssertChunks(range, 5, 20); }
public void AddChunk_BeforeMin() { // Arrange var range = Int.Range(10, 20); // Assume AssertChunks(range, 10, 20); // Act range.Range(5, 8); // Assert AssertChunks(range, 5, 8, 10, 20); }
public void AddChunk_InfinityBeforeMin() { // Arrange var range = Int.Range(10, 20); // Assume AssertChunks(range, 10, 20); // Act range.Range(int.MinValue, 8); // Assert AssertChunks(range, int.MinValue, 8, 10, 20); }
public void AddChunk2_ContainingMax1_ContainingMinMax2() { // Arrange var range = Int.Range(10, 20); range.Range(30, 40); // Assume AssertChunks(range, 10, 20, 30, 40); // Act range.Range(15, 42); // Assert AssertChunks(range, 10, 42); }
public void AddChunk2_ImmediatelyBeforeMin1() { // Arrange var range = Int.Range(10, 20); range.Range(30, 40); // Assume AssertChunks(range, 10, 20, 30, 40); // Act range.Range(5, 9); // Assert AssertChunks(range, 5, 20, 30, 40); }
public void AddChunkThatCompleteBoth() { // Arrange var range = Int.Range(1, int.MaxValue); range.Range(int.MinValue, -1); // Assume AssertChunks(range, int.MinValue, -1, 1, int.MaxValue); // Act range.Range(0, 0); // Assert AssertChunks(range, int.MinValue, int.MaxValue); }
public void AddChunk2_ImmediatelyAfterMax2_Infinity() { // Arrange var range = Int.Range(10, 20); range.Range(30, 40); // Assume AssertChunks(range, 10, 20, 30, 40); // Act range.Range(41, int.MaxValue); // Assert AssertChunks(range, 10, 20, 30, int.MaxValue); }
public void AddChunk2_ImmediatelyAfterMax2_AfterMax2() { // Arrange var range = Int.Range(10, 20); range.Range(30, 40); // Assume AssertChunks(range, 10, 20, 30, 40); // Act range.Range(41, 46); // Assert AssertChunks(range, 10, 20, 30, 46); }
public void AddChunk2_BetweenMinMax2_Infinity() { // Arrange var range = Int.Range(10, 20); range.Range(30, 40); // Assume AssertChunks(range, 10, 20, 30, 40); // Act range.Range(34, int.MaxValue); // Assert AssertChunks(range, 10, 20, 30, int.MaxValue); }
public void AddChunk2_BetweenMinMax2_AfterMax2() { // Arrange var range = Int.Range(10, 20); range.Range(30, 40); // Assume AssertChunks(range, 10, 20, 30, 40); // Act range.Range(34, 46); // Assert AssertChunks(range, 10, 20, 30, 46); }
public void AddChunk2_ContainingMinMax1_ImmediatelyBeforeMin2() { // Arrange var range = Int.Range(10, 20); range.Range(30, 40); // Assume AssertChunks(range, 10, 20, 30, 40); // Act range.Range(5, 29); // Assert AssertChunks(range, 5, 40); }
public void AddChunk2_AfterMax1_ImmediatelyBeforeMin2() { // Arrange var range = Int.Range(10, 20); range.Range(30, 40); // Assume AssertChunks(range, 10, 20, 30, 40); // Act range.Range(23, 29); // Assert AssertChunks(range, 10, 20, 23, 40); }
public void AddChunk2_ImmediatelyAfterMax1_BetweenMinMax2() { // Arrange var range = Int.Range(10, 20); range.Range(30, 40); // Assume AssertChunks(range, 10, 20, 30, 40); // Act range.Range(21, 34); // Assert AssertChunks(range, 10, 40); }
public void AddChunk2_ContainingMinMax1_Infinity() { // Arrange var range = Int.Range(10, 20); range.Range(30, 40); // Assume AssertChunks(range, 10, 20, 30, 40); // Act range.Range(5, int.MaxValue); // Assert AssertChunks(range, 5, int.MaxValue); }
public void AddChunk2_BetweenMinMax1() { // Arrange var range = Int.Range(10, 20); range.Range(30, 40); // Assume AssertChunks(range, 10, 20, 30, 40); // Act range.Range(15, 18); // Assert AssertChunks(range, 10, 20, 30, 40); }