Ejemplo n.º 1
0
        /// <summary>
        /// Handles the Click event of the ScanButton 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 ScanButtonClick(object sender, System.EventArgs e)
        {
            CheckOutServices.Scan((long)CodeNumericUpDown.Value);

            CodeNumericUpDown.Value = 0;
            CodeNumericUpDown.Focus();
        }
        public void Close_ShouldReturnPositiveBill_WhenSomethingScanned()
        {
            // Arrange
            CheckOutServices.Start();
            CheckOutServices.Scan(12345678);

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

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