/// <summary> /// The entry point of the program. /// </summary> private static void Main() { Console.WriteLine(GeometryUtils.CalcTriangleArea(3, 4, 5)); Console.WriteLine(LanguageUtils.DigitToText(5)); Console.WriteLine(StatisticalUtils.Max(5, -1, 3, 2, 14, 2, 3)); ConsolePrinter.PrintNumber(1.3, 2); ConsolePrinter.PrintPercent(0.75, 0); ConsolePrinter.PrintAligned(2.30, 8); Console.WriteLine(GeometryUtils.CalcDistance(3, -1, 3, 2.5)); Console.WriteLine("Horizontal? " + GeometryUtils.IsLineHorizontal(3, -1, 3, 2.5)); Console.WriteLine("Vertical? " + GeometryUtils.IsLineVertical(3, -1, 3, 2.5)); Student peter = new Student() { FirstName = "Peter", LastName = "Ivanov", DateOfBirth = new DateTime(1992, 03, 17) }; Student stella = new Student() { FirstName = "Stella", LastName = "Markova", DateOfBirth = new DateTime(1993, 11, 3) }; Console.WriteLine( "Is {0} older than {1}? -> {2}", peter.FirstName, stella.FirstName, peter.DateOfBirth.IsEarlierThan(stella.DateOfBirth)); }
public void TestDigitToText1() { string[] digits = new string[10] { "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" }; for (int i = 0; i < 10; i++) { string word = LanguageUtils.DigitToText(i); Assert.AreEqual(digits[i], word); } }
public void TestDigitToText3_ThrowsException() { string word = LanguageUtils.DigitToText(10); }