Exemplo n.º 1
0
        public void Purchase_HarryPotter_episode_from_1_to_4_price_is_320_after_20_percent_discount()
        {
            //Arrange
            var products = new List <Product>()
            {
                new Product()
                {
                    Name = "HarryPotter", Episode = 1, Count = 1
                },
                new Product()
                {
                    Name = "HarryPotter", Episode = 2, Count = 1
                },
                new Product()
                {
                    Name = "HarryPotter", Episode = 3, Count = 1
                },
                new Product()
                {
                    Name = "HarryPotter", Episode = 4, Count = 1
                },
            };

            var target = new CashierService();

            //Act
            var actual = target.GetPurchasingPrice(products);

            //Assert
            Assert.AreEqual(320, actual);
        }
Exemplo n.º 2
0
        public void Purchase_HarryPotter_episode1_1_and_episode2_2_and_episode3_2_price_is_460()
        {
            //Arrange
            var products = new List <Product>()
            {
                new Product()
                {
                    Name = "HarryPotter", Episode = 1, Count = 1
                },
                new Product()
                {
                    Name = "HarryPotter", Episode = 2, Count = 2
                },
                new Product()
                {
                    Name = "HarryPotter", Episode = 3, Count = 2
                },
            };

            var target = new CashierService();

            //Act
            var actual = target.GetPurchasingPrice(products);

            //Assert
            Assert.AreEqual(460, actual);
        }
Exemplo n.º 3
0
        public void Purchase_HarryPotter_episode1_1_and_episode2_1_price_is_190_after_5_percent_discount()
        {
            //Arrange
            //當我到了收銀台
            var products = new List <Product>()
            {
                new Product()
                {
                    Name = "HarryPotter", Episode = 1, Count = 1
                },
                new Product()
                {
                    Name = "HarryPotter", Episode = 2, Count = 1
                },
            };

            var target = new CashierService();

            //Act
            //給收銀台 哈利波特 第 1 集 1 本, 第 2 集 1 本

            var actual = target.GetPurchasingPrice(products);

            //Assert
            //結帳價格為 190 元
            Assert.AreEqual(190, actual);
        }
 public WorkStatus(Form Cashier)
 {
     InitializeComponent();
     objPOSService     = new POSService();
     objCashierService = new CashierService();
     this.Cashier      = Cashier;
     Cashier.Hide();
 }
Exemplo n.º 5
0
        public void Purchase_HarryPotter_episode1_1_price_is_100()
        {
            //Arrange
            //當我到了收銀台
            var products = new List <Product>()
            {
                new Product()
                {
                    Name = "HarryPotter", Episode = 1, Count = 1
                }
            };

            var target = new CashierService();

            //Act
            //給收銀台 哈利波特 第 1 集 1 本
            var actual = target.GetPurchasingPrice(products);

            //Assert
            //結帳價格為 100 元
            Assert.AreEqual(100, actual);
        }
 public PendingBills()
 {
     InitializeComponent();
     objPOSService     = new POSService();
     objCashierService = new CashierService();
 }
Exemplo n.º 7
0
        public IActionResult TicketItem(int ticketId)
        {
            var model = new CashierService(db).GetTicketsItem(ticketId);

            return(View(model));
        }
Exemplo n.º 8
0
 public LockFormPresenter(LockForm view)
 {
     this.view = view;
     service   = new CashierService();
 }
Exemplo n.º 9
0
 public CashierSaleReport()
 {
     InitializeComponent();
     obj = new CashierService();
 }
Exemplo n.º 10
0
 public LoginPresenter(LoginInitForm view)
 {
     this.view          = view;
     this.service       = new CashierService();
     this.configService = new SystemConfigService();
 }
Exemplo n.º 11
0
 public ServiceTests(ITestOutputHelper outputHelper)
 {
     _outputHelper   = outputHelper;
     _cashierService = new CashierService(BaseUrl, MerchantId, PublicKey, PrivateKey, TimeSpan.FromSeconds(3));
 }
Exemplo n.º 12
0
        public IActionResult FlightsByFilter(FlightFilter filter)
        {
            var model = new CashierService(db).GetFlightsByFilter(filter);

            return(PartialView("_FlightsByFilter", model));
        }
Exemplo n.º 13
0
        public IActionResult PassengersByFilter(PassengerFilter filter)
        {
            var model = new CashierService(db).GetPassengersByFilter(filter);

            return(PartialView("_PassengersByFilter", model));
        }
 public RDCashierhour()
 {
     InitializeComponent();
     obj = new CashierService();
 }
Exemplo n.º 15
0
        public IActionResult PassengerItem(UpdatePassenger passengerItem)
        {
            var result = new CashierService(db).SavePassenger(passengerItem);

            return(RedirectToAction("PassengerItem", "Cashier", new { passengerId = passengerItem.PassengerId }));
        }
Exemplo n.º 16
0
        public IActionResult PassengerItem(int passengerId)
        {
            PassengerFullInfo model = new CashierService(db).GetPassengersItem(passengerId);

            return(View(model));
        }
Exemplo n.º 17
0
        public IActionResult FlightsItem(int flightId)
        {
            var model = new CashierService(db).GetFlightsItem(flightId);

            return(View(model));
        }
Exemplo n.º 18
0
        public IActionResult TicketsByFilter()
        {
            var model = new CashierService(db).GetTicketsByFilter();

            return(PartialView("_TicketsByFilter", model));
        }