public void NegativeConditionalTestingCalculatedMarks() { var percentage = new Marks(); double marks = percentage.CalculateMarks(60); // Check if expacted marks and actual marks are same Assert.AreEqual(200, marks); }
public void NegativeConditionalTestingBoundryValue() { try { var percentage = new Marks(); // It must throw exception because percentage value is out of boundry value double marks = percentage.CalculateMarks(145); } catch (Exception ex) { Assert.Fail(ex.Message); } }
public void PositiveConditionalTestingBoundryValue() { try { var percentage = new Marks(); // It will not throw exception because percentage value is within boundry values double marks = percentage.CalculateMarks(75); } catch (Exception ex) { Assert.Fail(ex.Message); } }
public void PositiveConditionalTestingPositiveValue() { try { var percentage = new Marks(); // it will not throw exception as marks value is posivtive and within boundry value double marks = percentage.CalculateMarks(5); } catch (Exception ex) { Assert.Fail(ex.Message); } }
public void NegativeConditionalTestingNegativeValue() { try { var percentage = new Marks(); // It will throw exception as marks value is negative double marks = percentage.CalculateMarks(-50); } catch (Exception ex) { Assert.Fail(ex.Message); } }