예제 #1
0
        public void InventoryContainsTest()
        {
            var shark = new Library.Animal();

            shark.Name = "shark";
            var nyc = new Library.Store();

            nyc.Inventory = new Dictionary <Library.Animal, int>();
            nyc.AddToInventory(shark, 20);
            var actual = nyc.InInventory(shark);

            Assert.True(actual == true);
        }
예제 #2
0
        public void AddInventoryTestFail()
        {
            var shark = new Library.Animal();

            shark.Name = "shark";
            var nyc = new Library.Store();

            nyc.Inventory = new Dictionary <Library.Animal, int>();
            nyc.AddToInventory(shark, 0);
            var actual = nyc.InInventory(shark);

            Assert.True(actual == false);
        }