예제 #1
0
        public void StorageDepartmentRemoveProduction()
        {
            var machineList      = CreateRobotMachine();
            var pipleListSt      = CreatePipleList();
            var productionListSt = CreatePrimaryProduction();

            var st = new StorageDepartment(machineList, "Заготовительный цех№1", pipleListSt,
                                           new List <Production>(productionListSt));

            st.RemoveProduction(0);

            Assert.AreEqual(3, st.Productions.Count);
        }
예제 #2
0
        public void StorageDepartmentRemoveProduction_ERROR()
        {
            try
            {
                var machineList      = CreateRobotMachine();
                var pipleListSt      = CreatePipleList();
                var productionListSt = CreatePrimaryProduction();

                var st = new StorageDepartment(machineList, "Заготовительный цех№1", pipleListSt,
                                               new List <Production>(productionListSt));

                st.RemoveProduction(66);

                Assert.Fail();
            }
            catch (Exception e)
            {
                Assert.AreEqual("Неверный индекс", e.Message);
            }
        }