Esempio n. 1
0
        public void AddListedNumbers_withNotNullLists(Dictionary <int, List <int> > input)
        {
            var myMath = new Sum();
            int result = 0;

            foreach (var value in input.Values)
            {
                result = myMath.AddListedNumbers(value);
                foreach (var key in input.Keys)
                {
                    Assert.AreEqual(key, result);
                }
            }
        }
Esempio n. 2
0
        public void AddListedNumbers_WithNullList_TrhowsException()
        {
            var myMath = new Sum();

            Assert.Throws <NullReferenceException>(() => myMath.AddListedNumbers(null));
        }