public void StorageDepartmentEditPiple() { var machineList = CreateRobotMachine(); var pipleListSt = CreatePipleList(); var productionListSt = CreatePrimaryProduction(); var st = new StorageDepartment(machineList, "Заготовительный цех№1", pipleListSt, new List <Production>(productionListSt)); string piple = "Жууновский В.Я."; st.EditPiple(0, piple); Assert.AreEqual(piple, st.PipleList[0]); }
public void StorageDepartmentEditPiple_ERROR() { try { var machineList = CreateRobotMachine(); var pipleListSt = CreatePipleList(); var productionListSt = CreatePrimaryProduction(); var st = new StorageDepartment(machineList, "Заготовительный цех№1", pipleListSt, new List <Production>(productionListSt)); string piple = "Жууновский В.Я."; st.EditPiple(66, piple); Assert.Fail(); } catch (Exception e) { Assert.AreEqual("Неверный индекс", e.Message); } }