public void StorageDepartmentEditProduction() { var machineList = CreateRobotMachine(); var pipleListSt = CreatePipleList(); var productionListSt = CreatePrimaryProduction(); var st = new StorageDepartment(machineList, "Заготовительный цех№1", pipleListSt, new List <Production>(productionListSt)); Production production = new PrimaryProduction(TypeMaterial.Aluminum, TypeProduction.Plate, "Лист AL-4", new Size(50, 70, 5, 3), 1000); st.EditProduction(0, production); Assert.AreEqual(production, st.Productions[0]); }
public void StorageDepartmentEditProduction_ERROR() { try { var machineList = CreateRobotMachine(); var pipleListSt = CreatePipleList(); var productionListSt = CreatePrimaryProduction(); var st = new StorageDepartment(machineList, "Заготовительный цех№1", pipleListSt, new List <Production>(productionListSt)); Production production = new PrimaryProduction(TypeMaterial.Aluminum, TypeProduction.Plate, "Лист AL-4", new Size(50, 70, 5, 3), 1000); st.EditProduction(66, production); Assert.Fail(); } catch (Exception e) { Assert.AreEqual("Неверный индекс", e.Message); } }