public void StorageDepartmentRemovePiple() { var machineList = CreateRobotMachine(); var pipleListSt = CreatePipleList(); var productionListSt = CreatePrimaryProduction(); var st = new StorageDepartment(machineList, "Заготовительный цех№1", pipleListSt, new List <Production>(productionListSt)); st.RemovePiple(0); Assert.AreEqual(2, st.PipleList.Count); }
public void StorageDepartmentRemovePiple_ERROR() { try { var machineList = CreateRobotMachine(); var pipleListSt = CreatePipleList(); var productionListSt = CreatePrimaryProduction(); var st = new StorageDepartment(machineList, "Заготовительный цех№1", pipleListSt, new List <Production>(productionListSt)); st.RemovePiple(66); Assert.Fail(); } catch (Exception e) { Assert.AreEqual("Неверный индекс", e.Message); } }