示例#1
0
        public void FindTwoNumbersInTheArrayThatAddsTo_Returns_True()
        {
            var num           = 17;
            var unorderedList = new List <int> {
                10, 2, 11, 12, 7
            };
            var problem = new DailyCodingProblems();

            var actual = problem.GetTwoNumbersInTheArrayThatAddsTo(unorderedList, num);

            Assert.True(actual);
        }
示例#2
0
        public void GetTheMultiplicationArray_ReturnsTheMultiplicationArray()
        {
            var unorderedList = new List <int> {
                1, 2, 3, 4, 5
            };
            var expected = new List <int> {
                120, 60, 40, 30, 24
            };
            var problem = new DailyCodingProblems();

            var actual = problem.GetTheMultiplicationArray(unorderedList);

            for (var i = 0; i < actual.Count; ++i)
            {
                Assert.True(expected[i] == actual[i]);
            }
        }