public void GetPriceForOtherWithoutDiscount() { SaleBoradModel model = new SaleBoradModel(); model.PropertyAddress = new PropertyAddress(); model.PropertyAddress.State = "TAS"; model.BoardSize = BoardSize.Large; model.DateFrom = DateTime.Today; model.DateTo = DateTime.Today.AddDays(5); decimal expected = model.GetPrice(); Assert.AreEqual(100m, expected); }
public void GetPriceForNoServiceArea() { SaleBoradModel model = new SaleBoradModel(); model.PropertyAddress = new PropertyAddress(); model.PropertyAddress.State = "QLD"; model.BoardSize = BoardSize.Large; model.DateFrom = DateTime.Today; model.DateTo = DateTime.Today.AddDays(5); decimal expected = model.GetPrice(); Assert.AreEqual(0m, expected); }
public void GetPriceForNSWWithDiscount() { SaleBoradModel model = new SaleBoradModel(); model.PropertyAddress = new PropertyAddress(); model.PropertyAddress.State = "NSW"; model.BoardSize = BoardSize.Small; model.DateFrom = DateTime.Today; model.DateTo = DateTime.Today.AddDays(11); decimal expected = model.GetPrice(); Assert.AreEqual(467.50m, expected); }
public JsonResult CheckPrice(SaleBoradModel salsesOrder) { salsesOrder.GetPrice(); return(Json(salsesOrder, JsonRequestBehavior.AllowGet)); }