public void Test_ConvertString() { var exercise06 = new Exercise06(); Assert.AreEqual(exercise06.ConvertString("abcccceeeeeefddd"), "abc4e6fd3"); Assert.AreEqual(exercise06.ConvertString("abbbbbbbbbbbbbc"), "ab13c"); }
public void Test_SumOfSequence_Ok(int a, int result) { Assert.AreEqual(Exercise06.SumOfSequence(a), result); }
public void Test_Calculate() { var exercise06 = new Exercise06(); Assert.AreEqual(exercise06.Calculate(12), 728); }
public void TestVeryBigNumberNumber() { var actualResult = Exercise06.Run(999999999999); Assert.AreEqual(108, actualResult); }
public void TestТRoundedNumber() { var actualResult = Exercise06.Run(2000000000); Assert.AreEqual(2, actualResult); }
public void TestТNegativeNumber() { var actualResult = Exercise06.Run(-1354626729); Assert.AreEqual(45, actualResult); }
public void TestZeroNumber() { var actualResult = Exercise06.Run(0); Assert.AreEqual(0, actualResult); }
public void Test_BinarySearch() { var exercise06 = new Exercise06(); Assert.AreEqual(exercise06.BinarySearch(new int[] { 1, 2, 5, 7, 12, 20, 35 }, 5), 2); }
public void Test_Exercise6(long n, long expected) { var actualResult = Exercise06.Run(n); actualResult.Should().Be(expected); }