예제 #1
0
        public void SearchNumbersWithEmptyResult()
        {
            var result = NumbersFunctions.SearchNumbers(30, 2);

            Assert.AreEqual(expected: new int[] { }, result);
        }
예제 #2
0
        public void SearchNumbersWithOneResult()
        {
            var result = NumbersFunctions.SearchNumbers(1, 2);

            Assert.AreEqual(expected: new int[] { 1, 10, 10 }, result);
        }
예제 #3
0
 public void InvalidSumParam()
 {
     Assert.Throws <ArgumentException>(() => NumbersFunctions.SearchNumbers(-10, 10));
 }
예제 #4
0
        public void ValidParam()
        {
            var result = NumbersFunctions.SearchNumbers(6, 3);

            Assert.AreEqual(expected: new int[] { 21, 105, 600 }, result);
        }
예제 #5
0
 public void InvalidCapacityParam()
 {
     Assert.Throws <ArgumentException>(() => NumbersFunctions.SearchNumbers(10, -1));
 }