static void Main(string[] args) { //================================================================// //================================================================// //WarmUP MODULE // //================================================================// //================================================================// #region [===== WarmUP MODULE =====] //Console.WriteLine("================ TEST 01 ==============="); //var test01 = new SolveMeFirst(); //test01.Start(); Console.WriteLine("================ TEST 02 ==============="); var test02 = new SimpleArraySum(); test02.Start(); Console.WriteLine("================ TEST 03 ==============="); var test03 = new CompareTheTriplets(); test03.Start(); Console.WriteLine("================ TEST 04 ==============="); var test04 = new AVeryBigSum(); test04.Start(); Console.WriteLine("================ TEST 05 ==============="); var test05 = new DiagonalDifference(); test05.Start(); Console.WriteLine("================ TEST 06 ==============="); var test06 = new PlusMinus(); test06.Start(); Console.WriteLine("================ TEST 07 ==============="); var test07 = new MiniMaxSum(); test07.Start(); Console.WriteLine("================ TEST 08 ==============="); var test08 = new Staircase(); test08.Start(); Console.WriteLine("================ TEST 09 ==============="); var test09 = new BirthdayCakeCandles(); test09.Start(); Console.WriteLine("================ TEST 10 ==============="); var test10 = new TimeConversion(); test10.Start(); Console.WriteLine("================ TEST 11 ==============="); #endregion }
public void WhenEveryThingIsValid_ThenReturnWrite() { var algorithm = new CompareTheTriplets(); var input1 = new [] { 5, 6, 7 }; var input2 = new [] { 3, 6, 10 }; var result = algorithm.Solve(input1, input2); Assert.AreEqual(result[0], result[1]); Assert.AreEqual(result[0], 1); }
public void CompareTheTripletTests() { // Test case 1 var exercise = new CompareTheTriplets("5 6 7", "3 6 10"); var result = exercise.Execute(); var aliceRating = 1; var bobRating = 1; Assert.AreEqual(aliceRating, result[0]); Assert.AreEqual(bobRating, result[1]); // Test case 2 exercise = new CompareTheTriplets("17 28 30", "99 16 8"); result = exercise.Execute(); aliceRating = 2; bobRating = 1; Assert.AreEqual(aliceRating, result[0]); Assert.AreEqual(bobRating, result[1]); }