public void Test_Start_NullPerformer() { Procedure procedure = new Procedure(); ConcreteProcedureStep procedureStep = new ConcreteProcedureStep(procedure); procedureStep.Start((Staff)null); // Perform event }
public void Test_PerformingStaff() { Procedure procedure = new Procedure(); ConcreteProcedureStep procedureStep = new ConcreteProcedureStep(procedure); Staff performer = new Staff(); procedureStep.Start(performer); Assert.IsNotNull(procedureStep.Performer); Assert.AreEqual(performer, procedureStep.PerformingStaff); }
public void Test_Start_NoStartTime() { Procedure procedure = new Procedure(); ConcreteProcedureStep procedureStep = new ConcreteProcedureStep(procedure); Staff performer = new Staff(); Assert.AreEqual(ActivityStatus.SC, procedureStep.State); procedureStep.Start(performer);// Perform event // Make assertions Assert.AreEqual(ActivityStatus.IP, procedureStep.State); Assert.IsTrue(RoughlyEqual(Platform.Time, procedureStep.StartTime)); Assert.IsInstanceOf(typeof(ProcedureStepPerformer), procedureStep.Performer); Assert.AreEqual(performer, ((ProcedureStepPerformer)procedureStep.Performer).Staff); }
public void Test_Start() { DateTime? later = DateTime.Now.AddHours(2); Procedure procedure = new Procedure(); ConcreteProcedureStep procedureStep = new ConcreteProcedureStep(procedure); Staff performer = new Staff(); Assert.AreEqual(ActivityStatus.SC, procedureStep.State); procedureStep.Start(performer, later);// Perform event // Make assertions Assert.AreEqual(ActivityStatus.IP, procedureStep.State); Assert.AreEqual(later, procedureStep.StartTime); Assert.IsInstanceOf(typeof(ProcedureStepPerformer), procedureStep.Performer); Assert.AreEqual(performer, ((ProcedureStepPerformer)procedureStep.Performer).Staff); }
public void Test_Start_NoStartTime() { Procedure procedure = new Procedure(); ConcreteProcedureStep procedureStep = new ConcreteProcedureStep(procedure); Staff performer = new Staff(); Assert.AreEqual(ActivityStatus.SC, procedureStep.State); procedureStep.Start(performer);// Perform event // Make assertions Assert.AreEqual(ActivityStatus.IP, procedureStep.State); Assert.IsTrue(RoughlyEqual(Platform.Time, procedureStep.StartTime)); Assert.IsInstanceOfType(typeof(ProcedureStepPerformer), procedureStep.Performer); Assert.AreEqual(performer, ((ProcedureStepPerformer)procedureStep.Performer).Staff); }
public void Test_Start() { DateTime? later = DateTime.Now.AddHours(2); Procedure procedure = new Procedure(); ConcreteProcedureStep procedureStep = new ConcreteProcedureStep(procedure); Staff performer = new Staff(); Assert.AreEqual(ActivityStatus.SC, procedureStep.State); procedureStep.Start(performer, later);// Perform event // Make assertions Assert.AreEqual(ActivityStatus.IP, procedureStep.State); Assert.AreEqual(later, procedureStep.StartTime); Assert.IsInstanceOfType(typeof(ProcedureStepPerformer), procedureStep.Performer); Assert.AreEqual(performer, ((ProcedureStepPerformer)procedureStep.Performer).Staff); }