public void solution_Test_ABCBBCBA() { // Arrange Codility_Kantaloop test = new Codility_Kantaloop(); string S = "ABCBBCBA"; string expected = ""; // Act string result = test.solution(S); // Assert Assert.AreEqual(expected, result); }
public void smallestPositiveIntegerNotInArray_Test2() { // Arrange Codility_Kantaloop test = new Codility_Kantaloop(); int[] A = new int[] { -1, -2, -3 }; int expected = 1; // Act int result = test.smallestPositiveIntegerNotInArray(A); // Assert Assert.AreEqual(expected, result); }
public void addTwoNumbers_Test1() { // Arrange Codility_Kantaloop test = new Codility_Kantaloop(); int a = 1; int b = 2; int expected = (1 + 2); // Act int result = test.addTwoNumbers(a, b); // Assert Assert.AreEqual(result, expected); }
public void GetNumbers_Test() { // Arrange Codility_Kantaloop test = new Codility_Kantaloop(); string filepath = @"C:\TEMP\canta1.txt"; int[] expected = new int[] { 137, -104, 0, 1, 0, -1 }; // Act int[] result = test.GetNumbers(filepath); // Assert for (int i = 0; i < expected.Length; i++) { Assert.AreEqual(expected[i], result[i]); } }