public void TestAddition () { MathOp op = new MathOp (); op.LeftOperand = 20; op.RightOperand = 20; op.Operator = "plus"; op.Result = 0; ViewResult ViewR = (ViewResult) controller.DoMathOp (op); MathOp model = (MathOp) ViewR.Model; Assert.Equal (60, model.Result); }
public void TestAddition() { //Arrange MathOp op = new MathOp(); op.Left = 10; op.Right = 5; op.Operator = "Plus"; op.Result = 0; //Act ViewResult vr = (ViewResult)controller.DoMathOp(op); MathOp model = (MathOp)vr.Model; //Assert Assert.Equal(15, model.Result); }