public void _14_WhenStateIsNotWI_SholudReturnOneString() { // Arrange string state = "aa"; decimal amount = 15.5m; int expected = 1; Ex14 ex = new Ex14(state, amount); // Act string[] actual = ex.GetResult(); // Assert Assert.AreEqual(expected, actual.Length); }
public PartialViewResult _14([FromBody] Ex14ViewModel vm) { if (!ModelState.IsValid) { RedirectToAction(nameof(_14)); } var amount = decimal.Parse(vm.Amount.Replace(".", ",")); Ex14 ex = new Ex14(vm.State, amount); vm.Result = ex.GetResult(); return(PartialView("_14_partial", vm)); }