コード例 #1
0
        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);
        }
コード例 #2
0
        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);
        }
コード例 #3
0
        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);
        }
コード例 #4
0
 public JsonResult CheckPrice(SaleBoradModel salsesOrder)
 {
     salsesOrder.GetPrice();
     return(Json(salsesOrder, JsonRequestBehavior.AllowGet));
 }