Exemple #1
0
        /// <summary>
        /// Handles the Click event of the CloseButton control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        private void CloseButtonClick(object sender, System.EventArgs e)
        {
            BillDTO bill = CheckOutServices.Close();

            EnableCheckOutControls(false);
            Display(bill);
        }
        public void Close_ShouldReturnZeroBill_WhenNothingScanned()
        {
            // Arrange
            CheckOutServices.Start();

            // Act
            var bill = CheckOutServices.Close();

            // Assert
            bill.Should().NotBeNull();
            bill.TotalPrice.Should().Be(0);
        }
        public void Close_ShouldReturnPositiveBill_WhenSomethingScanned()
        {
            // Arrange
            CheckOutServices.Start();
            CheckOutServices.Scan(12345678);

            // Act
            var bill = CheckOutServices.Close();

            // Assert
            bill.Should().NotBeNull();
            bill.TotalPrice.Should().BePositive();
        }