public void CubeTest()
        {
            Assert.AreEqual(8, objectUnderTest.Cube(2));

            objectUnderTest.Cube(-2)
            .ShouldBe(-8);
        }
 public void CubeTest()
 {
     Assert.AreEqual(9, objectUnderTest.Cube(2), 1);
     /* objectUnderTest.Cube(2)
                    .ShouldBe(8);
     objectUnderTest.Cube(-2)
                    .ShouldBe(-8); */
 }
示例#3
0
        static void Main(string[] args)
        {
            MathFunctionsClass mathFunctions = new MathFunctionsClass();

            Console.WriteLine($"The value of pi cubed is: {mathFunctions.Cube(Math.PI):F3}");
            //cw tab tab for Console.WriteLine()
            //$ - string interpolation
            //:F3 three decimal points
        }
 public void CubeTest()
 {
     Assert.AreEqual(8, objectUnderTest.Cube(2));
 }
示例#5
0
        static void Main(string[] args)
        {
            MathFunctionsClass mathFunctions = new MathFunctionsClass();

            Console.WriteLine($"{mathFunctions.Cube(Math.PI):F3}");
        }