public void DoSumming_UsingMissingRightOperand_DisplaysError()
 {
     SummingModel summingModel = new SummingModel {LeftOperand = "leftoperand"};
     SummingController summingController = new SummingController();
     summingController.DoSumming(summingModel);
     Assert.IsTrue(summingController.ModelState.ContainsKey("RightOperand"));
 }
 public void DoSumming_UsingRomanNumbersAsLeftAndRightOperand_DisplaysSummingResult()
 {
     SummingModel summingModel = new SummingModel {LeftOperand = "MD", RightOperand = "LX"};
     SummingController summingController = new SummingController();
     ViewResult viewResult = (ViewResult) summingController.DoSumming(summingModel);
     Assert.AreEqual("MDLX", viewResult.ViewBag.SummingResult);
 }
 public void DoSumming_UsingInvalidRomanNumberAsRightOperand_DisplaysError()
 {
     SummingModel summingModel = new SummingModel {LeftOperand = "MD", RightOperand = "IIII"};
     SummingController summingController = new SummingController();
     summingController.DoSumming(summingModel);
     Assert.IsTrue(summingController.ModelState.ContainsKey("RightOperand"));
 }