コード例 #1
0
        public void NoItemIsAddedOnPointOfSaleTerminal()
        {
            //Arrange
            PointOfSaleTerminal pointOfSale = new PointOfSaleTerminal();

            //Act
            int result = pointOfSale.ItemCount();

            //Assert
            Assert.AreEqual(0, result);
        }
コード例 #2
0
        public void ItemIsAddedOnPointOfSaleTerminal()
        {
            //Arrange
            PointOfSaleTerminal pointOfSale = new PointOfSaleTerminal();
            Product             A           = new Product("A", 1, 1.25);

            //Act
            pointOfSale.ScanProduct(A);
            int result = pointOfSale.ItemCount();

            //Assert
            Assert.AreEqual(1, result);
        }