public void Test_NumbersAppearTwice() { var exercise01 = new Exercise01(); Assert.AreEqual(exercise01.NumbersAppearTwice( new int[] { 1, 1, 2, 2, 3, 2, 5, 4, 4, 5, 4, 6, 4 }), "2 4"); }
public void Test_Bcnn() { var exercise01 = new Exercise01(); Assert.AreEqual(exercise01.Bcnn(6, 8), 24); Assert.AreEqual(exercise01.Bcnn(30, 48), 240); }
public void Test_Ucln() { var exercise01 = new Exercise01(); Assert.AreEqual(exercise01.Ucln(6, 8), 2); Assert.AreEqual(exercise01.Ucln(30, 48), 6); }
public void ShouldAdd() { Assert.AreEqual(2, Exercise01.Add(1, 1)); Assert.AreEqual(0, Exercise01.Add(112, -112)); Assert.AreEqual(-256, Exercise01.Add(-206, -50)); Assert.AreEqual(256, Exercise01.Add(150, 106)); Assert.AreEqual(17, Exercise01.Add(10, 7)); Assert.AreEqual(-5, Exercise01.Add(300, -305)); }
public void ShouldSubtract() { Assert.AreEqual(0, Exercise01.Subtract(10, 10)); Assert.AreEqual(5, Exercise01.Subtract(10, 5)); Assert.AreEqual(-15, Exercise01.Subtract(10, 25)); Assert.AreEqual(100000, Exercise01.Subtract(100001, 1)); Assert.AreEqual(-200, Exercise01.Subtract(50, 250)); Assert.AreEqual(13, Exercise01.Subtract(40, 27)); }
public void Exercise01_Test() { var input = new int[, ] { { 1, 2, 3, 4, 8, 1 }, { 5, 1, 2, 3, 4, 8 }, { 4, 5, 1, 2, 3, 4 }, { 7, 4, 5, 1, 2, 3 } }; var result = Exercise01.Toeplitz(input); var resultExpected = 7; Assert.Equal(resultExpected, result); }
public void TestMinValue() { var actualResult = Exercise01.Run(1); Assert.AreEqual("1", actualResult); }
public void TestNegativeValue() { var actualResult = Exercise01.Run(-5); Assert.AreEqual(string.Empty, actualResult); }
public void TestInvalidValue() { var actualResult = Exercise01.Run(0); Assert.AreEqual(string.Empty, actualResult); }
public void TestTwoDigitsValue() { var actualResult = Exercise01.Run(11); Assert.AreEqual("1 2 3 4 5 6 7 8 9 10 11", actualResult); }
public void Test_Exercise1(int input, string expected) { var actualResult = Exercise01.Run(input); actualResult.Should().BeEquivalentTo(expected); }
public void Exercise01_Test(string resultExpected, string key, string message) { var result = Exercise01.Decrypt(key, message); Assert.Equal(resultExpected, result); }
public void Exercise01_Test(string resultExpected, string[] player1, string[] player2) { var result = Exercise01.Rochambeau(player1, player2); Assert.Equal(resultExpected, result); }
public void Test_Bcnn_Ok(int a, int b, int result) { Assert.AreEqual(Exercise01.Bcnn(a, b), result); }
public void Test_TitleCaseToSnakeCase() { var exercise01 = new Exercise01(); Assert.AreEqual(exercise01.TitleCaseToSnakeCase("MyProgram"), "my_program"); }