コード例 #1
0
 /// <summary>
 ///     Constructor
 /// </summary>
 /// <param name="expect">the expectation which changed</param>
 /// <param name="newState">the new expectation state</param>
 /// <param name="prevState">the previous expectation state</param>
 /// <param name="message">the message associated to this expectation state change</param>
 public ExpectationStateChange(Expect expect, acceptor.RulePriority? priority, ExplanationPart explain)
     : base("Expectation state change", expect.Expectation, priority)
 {
     Expect = expect;
     Explanation = explain;
 }
コード例 #2
0
 /// <summary>
 ///     Constructor
 /// </summary>
 /// <param name="expect"></param>
 /// <param name="priority"></param>
 /// <param name="explain"></param>
 public FailedExpectation(Expect expect, acceptor.RulePriority? priority, ExplanationPart explain)
     : base(expect, priority, explain)
 {
     Message = "Failed expectation : " + Expect.Expectation.Name;
 }
コード例 #3
0
 /// <summary>
 ///     Constructor
 /// </summary>
 /// <param name="expect"></param>
 /// <param name="priority"></param>
 /// <param name="explain"></param>
 public ExpectationReached(Expect expect, acceptor.RulePriority? priority, ExplanationPart explain)
     : base(expect, priority, explain)
 {
     Message = "Expectation reached : " + Expect.Expectation.Name;
 }
コード例 #4
0
 /// <summary>
 ///     Positions a substep in the time line
 /// </summary>
 /// <param name="currentTime"></param>
 /// <param name="subStep"></param>
 /// <returns></returns>
 private void PositionSubStep(double currentTime, SubStep subStep)
 {
     SubStepActivated subStepActivated = new SubStepActivated(subStep, null) {Time = currentTime};
     PositionHandler.RegisterEvent(subStepActivated);
     foreach (Action action in subStep.Actions)
     {
         VariableUpdate variableUpdate = new VariableUpdate(action, action, null);
         PositionHandler.RegisterEvent(variableUpdate);
     }
     foreach (Expectation expectation in subStep.Expectations)
     {
         Expect expect = new Expect(expectation, null);
         PositionHandler.RegisterEvent(expect);
     }
 }