public void ContainsSubsetWithExactValue_ThrowsException_ForNullSequence() { Assert.Throws <ArgumentNullException>(() => Set.ContainsSubsetWithExactValue(null, 1)); }
public void ContainsSubsetWithExactValue_ThrowsException_ForZeroTargetSum() { Assert.Throws <ArgumentOutOfRangeException>(() => Set.ContainsSubsetWithExactValue(new int[] { }, 0)); }
public void ContainsSubsetWithExactValue_ThrowsException_ForNegativeNumberInSequence() { Assert.Throws <ArgumentOutOfRangeException>(() => Set.ContainsSubsetWithExactValue(new[] { -1 }, 1)); }
public void ContainsSubsetWithExactValue_ReturnsFalse_WhenSumCannotBeCompleted() { var result = Set.ContainsSubsetWithExactValue(new[] { 2 }, 1); Assert.IsFalse(result); }
public void ContainsSubsetWithExactValue_ReturnsFalse_ForEmptyArray() { var result = Set.ContainsSubsetWithExactValue(new int[] { }, 1); Assert.IsFalse(result); }
public void ContainsSubsetWithExactValue_ReturnsFalse_IfSumNotFound(int target) { var result = Set.ContainsSubsetWithExactValue(new[] { 1, 3, 5, 7 }, target); Assert.IsFalse(result); }
public void ContainsSubsetWithExactValue_ReturnsTrue_IfSumFound(int target) { var result = Set.ContainsSubsetWithExactValue(new[] { 1, 2, 3, 4, 5 }, target); Assert.IsTrue(result); }