Beispiel #1
0
        //TEST ADD SHELF:
        private AddShelfStatusCodes AddShelfNumberOne(Mock <IShelfManager> shelfManagerMock)
        {
            var aisleManagerMock = SetupMock(new Aisle {
                AisleNumber = 1
            });
            var storageAPI  = new StorageAPI(aisleManagerMock.Object, shelfManagerMock.Object);
            var successfull = storageAPI.AddShelf(1, 1);

            return(successfull);
        }
Beispiel #2
0
        public void AddShelfToNonExistingAisle()
        {
            var aisleManagerMock = SetupMock((Aisle)null);
            var shelfManagerMock = new Mock <IShelfManager>();

            var storageAPI = new StorageAPI(aisleManagerMock.Object, shelfManagerMock.Object);
            var result     = storageAPI.AddShelf(1, 1);

            Assert.AreEqual(AddShelfStatusCodes.NoSuchAisle, result);
            shelfManagerMock.Verify(
                m => m.AddShelf(1, 1), Times.Never());
        }