Пример #1
0
 public void SingleTest()
 {
     Assert.AreEqual("42 42", Day3.HighAndLow("42"));
 }
Пример #2
0
        public void RandomTest()
        {
            Random     r       = new Random();
            List <int> numbers = new List <int>();

            for (int i = r.Next(1, 42); i > 0; i--)
            {
                numbers.Add(r.Next(Int32.MinValue, Int32.MaxValue));
            }
            Assert.AreEqual(numbers.Max().ToString() + " " + numbers.Min().ToString(), Day3.HighAndLow(String.Join(" ", numbers.Select(n => n.ToString()).ToArray())));
        }
Пример #3
0
 public void MinusMinusZeroTest()
 {
     Assert.AreEqual("0 -1", Day3.HighAndLow("-1 -1 0"));
 }
Пример #4
0
 public void PlusPlusZeroTest()
 {
     Assert.AreEqual("1 0", Day3.HighAndLow("1 1 0"));
 }
Пример #5
0
 public void PlusPlusTest()
 {
     Assert.AreEqual("1 1", Day3.HighAndLow("1 1"));
 }
Пример #6
0
 public void SortTest()
 {
     Assert.AreEqual("10 -10", Day3.HighAndLow("10 2 -2 -10"));
 }
Пример #7
0
 public void SomeTest()
 {
     Assert.AreEqual("542 -214", Day3.HighAndLow("4 5 29 54 4 0 -214 542 -64 1 -3 6 -6"));
 }