public void IsEmpty_WithNonSelfExcludedSet_ReturnsFalse(int startAndEnd) { var intervalA = new IntegerInterval(startAndEnd, true, startAndEnd, true); var actual = intervalA.IsEmpty(); Assert.That(actual, Is.False); }
public void IsEmpty_WithNullSet_ReturnsTrue(int start, int end, bool startInclusive, bool endInclusive) { IntegerInterval intervalA = null; var actual = intervalA.IsEmpty(); Assert.That(actual, Is.True); }
public void IsEmpty_WithInOrderSetSet_ReturnsFalse(int start, int end, bool startInclusive, bool endInclusive) { Assume.That(start < end); var intervalA = new IntegerInterval(start, startInclusive, end, endInclusive); var actual = intervalA.IsEmpty(); Assert.That(actual, Is.False); }
public void IsEmpty_WithSelfExcludedSet_ReturnsTrue(int startAndEnd, bool startInclusive, bool endInclusive) { Assume.That(!startInclusive || !endInclusive); var intervalA = new IntegerInterval(startAndEnd, startInclusive, startAndEnd, endInclusive); var actual = intervalA.IsEmpty(); Assert.That(actual, Is.True); }
public void IsEmpty_WithBackwardsSet_ReturnsTrue(int start, int end, bool startInclusive, bool endInclusive) { Assume.That(start > end); var intervalA = new IntegerInterval(start, startInclusive, end, endInclusive); var actual = intervalA.IsEmpty(); Assert.That(actual, Is.True); }
public void Contains_WithEndAdjacentZeroIntervalExcluded_ReturnsFalse(bool aStartInclusive, bool bStartInclusive, bool bEndInclusively) { var intervalA = new IntegerInterval(0, aStartInclusive, 3, false); var intervalB = new IntegerInterval(3, bStartInclusive, 3, bEndInclusively); Assume.That(!intervalB.IsEmpty()); var result = intervalA.Contains(intervalB); Assert.That(result, Is.False); }
public void Contains_FromEmptyInterval_ReturnsFalse(bool aStartInclusive, bool aEndInclusive, int bStart, bool bStartInclusive, int bEnd, bool bEndInclusive) { var intervalA = new IntegerInterval(1, aStartInclusive, 0, aEndInclusive); var intervalB = new IntegerInterval(bStart, bStartInclusive, bEnd, bEndInclusive); Assume.That(!intervalB.IsEmpty()); var result = intervalA.Contains(intervalB); Assert.That(result, Is.False); }
public void Contains_WithStartAdjacentZeroIntervalExcluded_ReturnsFalse(bool aEndInclusive, bool bStartInclusive, bool bEndInclusively) { var intervalA = new IntegerInterval(0, false, 3, aEndInclusive); var intervalB = new IntegerInterval(0, bStartInclusive, 0, bEndInclusively); Assume.That(!intervalB.IsEmpty()); var result = intervalA.Contains(intervalB); Assert.That(result, Is.False); }
public void Contains_FromEmptyInterval_ReturnsFalse(bool aStartInclusive, bool aEndInclusive, int bStart, bool bStartInclusive, int bEnd, bool bEndInclusive) { var intervalA = new IntegerInterval(1, aStartInclusive, 0, aEndInclusive); var intervalB = new IntegerInterval(bStart, bStartInclusive, bEnd, bEndInclusive); Assume.That(!intervalB.IsEmpty()); var result = intervalA.Contains(intervalB); Assert.That(result, Is.False); }
public void IsEmpty_WithSelfExcludedSet_ReturnsTrue(int startAndEnd, bool startInclusive, bool endInclusive) { Assume.That(!startInclusive || !endInclusive); var intervalA = new IntegerInterval(startAndEnd, startInclusive, startAndEnd, endInclusive); var actual = intervalA.IsEmpty(); Assert.That(actual, Is.True); }
public void IsEmpty_WithNonSelfExcludedSet_ReturnsFalse(int startAndEnd) { var intervalA = new IntegerInterval(startAndEnd, true, startAndEnd, true); var actual = intervalA.IsEmpty(); Assert.That(actual, Is.False); }
public void IsEmpty_WithInOrderSetSet_ReturnsFalse(int start, int end, bool startInclusive, bool endInclusive) { Assume.That(start < end); var intervalA = new IntegerInterval(start, startInclusive, end, endInclusive); var actual = intervalA.IsEmpty(); Assert.That(actual, Is.False); }
public void IsEmpty_WithBackwardsSet_ReturnsTrue(int start, int end, bool startInclusive, bool endInclusive) { Assume.That(start > end); var intervalA = new IntegerInterval(start, startInclusive, end, endInclusive); var actual = intervalA.IsEmpty(); Assert.That(actual, Is.True); }