public void TestAddition() { //Arrange Calculations op = new Calculations(); op.leftOperand = 30; op.rightOperand = 30; op.Operator = "+"; op.result = 0; //Act ViewResult vr = (ViewResult)controller.DoCalculation(op); Calculations model = (Calculations)vr.Model; //Assert Assert.Equal(60, model.result); }