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); */ }
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)); }
static void Main(string[] args) { MathFunctionsClass mathFunctions = new MathFunctionsClass(); Console.WriteLine($"{mathFunctions.Cube(Math.PI):F3}"); }