public void Test_Reassign_Terminated() { Procedure procedure = new Procedure(); ConcreteProcedureStep procedureStep = new ConcreteProcedureStep(procedure); Staff performer = new Staff(); procedureStep.Discontinue(); ConcreteProcedureStep newStep = (ConcreteProcedureStep)procedureStep.Reassign(performer); }
public void Test_LinkTo_StateNotScheduled() { Procedure p1 = new Procedure(); Procedure p2 = new Procedure(); // create proc steps that support linking ConcreteProcedureStep ps1 = new ConcreteProcedureStep(p1, true); ConcreteProcedureStep ps2 = new ConcreteProcedureStep(p2, true); ps1.Discontinue(); Assert.AreEqual(ActivityStatus.DC, ps1.State); // should throw, because only a scheduled step can be linked to another ps1.LinkTo(ps2); }
public void Test_LinkTo_StateNotScheduled() { Procedure p1 = new Procedure(); Procedure p2 = new Procedure(); // create proc steps that support linking ConcreteProcedureStep ps1 = new ConcreteProcedureStep(p1, true); ConcreteProcedureStep ps2 = new ConcreteProcedureStep(p2, true); ps1.Discontinue(); Assert.AreEqual(ActivityStatus.DC, ps1.State); // should throw, because only a scheduled step can be linked to another ps1.LinkTo(ps2); }
public void Test_Reassign_Terminated() { Procedure procedure = new Procedure(); ConcreteProcedureStep procedureStep = new ConcreteProcedureStep(procedure); Staff performer = new Staff(); procedureStep.Discontinue(); ConcreteProcedureStep newStep = (ConcreteProcedureStep)procedureStep.Reassign(performer); }