public void CaculatorTotalPoint_WhenInputValidDataAndFailExpectation_ShouldBeFail() { //Arrage ICaculator calulator = new Caculator(); var dataCreation = calulator.Creation(); var input = "ANH"; var expected = 10; //Act var actutal = calulator.TotalPoints(dataCreation, input); //Assert Assert.AreNotEqual(expected, actutal); }
public void CaculatorTotalPoint_WhenInputValidData_ShouldBeSuccess() { //Arrage ICaculator calulator = new Caculator(); var dataCreation = calulator.Creation(); var input = "ANH"; var expected = 6; //Act var actutal = calulator.TotalPoints(dataCreation, input); //Assert Assert.AreEqual(expected, actutal); }
public void CaculatorTotalPoint_WhenInputIsNull_ShouldThrowArgumentNullException() { //Arrage ICaculator caculator = new Caculator(); var dataCreation = caculator.Creation(); var expectedParamName = "input"; string input = null; //Act try { caculator.TotalPoints(dataCreation, input); } catch (ArgumentNullException e) { //Assert Assert.AreEqual(expectedParamName, e.ParamName); } }