예제 #1
0
 public void Test7()
 {
     int[] result = LargestTwo.TwoOldestAges(new[] { 312, 93, 152, 390, 315, 370, 180, 259, 165 });
     Assert.AreEqual(new int[] { 370, 390 }, result);
     result = LargestTwo.TwoOldestAges(new[] { 1, 2, 10, 8 });
     Assert.AreEqual(new int[] { 8, 10 }, result);
     result = LargestTwo.TwoOldestAges(new[] { 2, 1 });
     Assert.AreEqual(new int[] { 1, 2 }, result);
 }
        public void TwoOldestAges_ArrInt_ArrInt()
        {
            //arrange
            int[] arr = { 1, 200, 660, 50, 777, 843 };

            //action
            var result = LargestTwo.TwoOldestAges(arr);

            //assert
            CollectionAssert.AreEqual(new int[] { 777, 843 }, result);
        }
예제 #3
0
 public void Test5()
 {
     int[] result = LargestTwo.TwoOldestAges(new[] { 1, 2 });
     Assert.AreEqual(new int[] { 1, 2 }, result);
 }
예제 #4
0
 public void Test4()
 {
     int[] result = LargestTwo.TwoOldestAges(new[] { 6, 5, 83, 83 });
     Assert.AreEqual(new int[] { 83, 83 }, result);
 }
예제 #5
0
 public void Test2()
 {
     int[] result = LargestTwo.TwoOldestAges(new[] { 1, 5, 87, 45, 8, 8 });
     Assert.AreEqual(new int[] { 45, 87 }, result);
 }
예제 #6
0
 public void Test1()
 {
     int[] result = LargestTwo.TwoOldestAges(new[] { 1, 2, 10, 8 });
     Assert.AreEqual(new int[] { 8, 10 }, result);
 }
예제 #7
0
파일: SecondTests.cs 프로젝트: bunea/Test
 public SecondTests()
 {
     largestTwo = new LargestTwo();
 }