public void render_a_result_view()
        {
            HomeController controller = new HomeController(_expenseCalculator);
            var model = new InputModel { InputValue = new Random().Next(123456789) / 100m };
            var expenseStructure = new ExpenseStructure(new Random().Next(99), new Random().Next(99), model.InputValue);
            _expenseCalculator.Calculate(model.InputValue).Returns(expenseStructure);

            controller.WithCallTo(a => a.Result(model.InputValue)).ShouldRenderView("Result").WithModel(expenseStructure);
        }
예제 #2
0
 protected bool Equals(ExpenseStructure other)
 {
     return _workingUnits == other._workingUnits && _rate == other._rate && _inputValue == other._inputValue;
 }