Exemplo n.º 1
0
 public void SquareTest()
 {
     Assert.AreEqual(36, objectUnderTest.Square(-6));
     Assert.AreEqual(0, objectUnderTest.Square(0));
     Assert.AreEqual(4, objectUnderTest.Square(2));
     //Using ShouldBe has the same function as Assert
     objectUnderTest.Square(6)
     .ShouldBe(36);
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            MathFunctionClass mathFunctions = new MathFunctionClass();

            Console.WriteLine($"The value of 2pi squared is: {mathFunctions.Square(2 * Math.PI):F3}");
        }