예제 #1
0
        public void GetAll_ReturnsEmptyList_ItemList()
        {
            //Arrange
            List <Bottle> expectedBottleList = new List <Bottle> {
            };

            //Act
            List <Bottle> actualBottleList = Bottle.GetAll();

            //Assert
            CollectionAssert.AreEqual(expectedBottleList, actualBottleList);
        }
예제 #2
0
        public void Save_SavesToDatabase_BottleList()
        {
            //Arrange
            Bottle        newBottle          = new Bottle("Zinfandel", "Mexico", "Don Giovanni", 1, 1);
            List <Bottle> expectedBottleList = new List <Bottle> {
                newBottle
            };

            //Act
            newBottle.Save();
            List <Bottle> actualBottleList = Bottle.GetAll();

            //Assert
            CollectionAssert.AreEqual(expectedBottleList, actualBottleList);
        }