public void TestAddReviewDocumentWhenSprintIsActive() { Sprint sprint = new Sprint(DateTime.Today, DateTime.Today.AddDays(10)); ReviewDocument document = new ReviewDocument(); sprint.Start(); sprint.AddReviewDocument(document); Assert.IsTrue(sprint.GetDocument() == null); }
public void TestAddReviewDocument() { Sprint sprint = new Sprint(DateTime.Today, DateTime.Today); ReviewDocument document = new ReviewDocument(); sprint.Start(); sprint.CheckTime(); sprint.AddReviewDocument(document); Assert.IsTrue(sprint.GetDocument() != null); }
public void Execute(object command) { switch (command) { case Start_sprint s: { var state = new SprintState( _all_events() .Where(_ => _._source == s.Sprint) .Select(_ => _._e)); var sprint = new Sprint(state, (e) => { state.Apply(e); _publish(new EventMessage(s.Sprint, e)); }); sprint.Start(); } break; case Finish_task s: { var state = new SprintState( _all_events() .Where(_ => _._source == s.Sprint) .Select(_ => _._e)); var sprint = new Sprint(state, (e) => { state.Apply(e); _publish(new EventMessage(s.Sprint, e)); }); sprint.Finish_task(s.Task); } break; } }