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); }
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); } }