Exemplo n.º 1
0
        public void Test_Complete_NullPerformer()
        {
            Procedure             procedure     = new Procedure();
            ConcreteProcedureStep procedureStep = new ConcreteProcedureStep(procedure);

            procedureStep.Complete((Staff)null); // Perform event
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        public void Test_Complete_NullPerformer()
        {
            Procedure procedure = new Procedure();
            ConcreteProcedureStep procedureStep = new ConcreteProcedureStep(procedure);

            procedureStep.Complete((Staff)null); // Perform event
		}
Exemplo n.º 4
0
        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);
        }