// This test example will fail since I'm not rounding in my calculation, I'm truncating public void Test_MyLogicTests_WhenPassingValidValuesShouldRoundProperly() { // Arrange var myLogic = new MyLogic(); // Act var actual = myLogic.HowFastIsMyRobotMoving(6, -100); // Assert // Expected result came from external calculation where I used Excel to calculate // the number Assert.AreEqual(-3770, actual); }
// Method proves that the logic will throw the expected exception public void TestEx_MyLogicTests_WhenPassingZeroRadiusShouldThrowException() { var myLogic = new MyLogic(); myLogic.HowFastIsMyRobotMoving(0, 100); }