Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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;
            }
        }