public void Test_Complete_NullPerformer() { Procedure procedure = new Procedure(); ConcreteProcedureStep procedureStep = new ConcreteProcedureStep(procedure); procedureStep.Complete((Staff)null); // Perform event }
public void Test_Complete() { Procedure procedure = new Procedure(); ConcreteProcedureStep procedureStep = new ConcreteProcedureStep(procedure); Staff performer = new Staff(); Assert.AreEqual(ActivityStatus.SC, procedureStep.State); procedureStep.Complete(performer); // Perform event // Make assertions Assert.AreEqual(ActivityStatus.CM, procedureStep.State); Assert.IsTrue(RoughlyEqual(Platform.Time, procedureStep.EndTime)); Assert.IsInstanceOf(typeof(ProcedureStepPerformer), procedureStep.Performer); Assert.AreEqual(performer, ((ProcedureStepPerformer)procedureStep.Performer).Staff); }
public void Test_Complete() { Procedure procedure = new Procedure(); ConcreteProcedureStep procedureStep = new ConcreteProcedureStep(procedure); Staff performer = new Staff(); Assert.AreEqual(ActivityStatus.SC, procedureStep.State); procedureStep.Complete(performer); // Perform event // Make assertions Assert.AreEqual(ActivityStatus.CM, procedureStep.State); Assert.IsTrue(RoughlyEqual(Platform.Time, procedureStep.EndTime)); Assert.IsInstanceOfType(typeof(ProcedureStepPerformer), procedureStep.Performer); Assert.AreEqual(performer, ((ProcedureStepPerformer)procedureStep.Performer).Staff); }