public void CanRemoveActivityList()
        {
            var          board            = new ActivityBoard();
            string       activityListName = "Doing";
            ActivityList list             = board.AddNewList(activityListName);

            board.RemoveList(list);
            Assert.That(board.ActivityLists, Is.Empty);
        }
        public void CanCreateActivityList()
        {
            var          board            = new ActivityBoard();
            string       activityListName = "Doing";
            ActivityList list             = board.AddNewList(activityListName);

            Assert.That(list.Name, Is.EqualTo(activityListName));
            Assert.That(board.ActivityLists, Has.Member(list));
        }
        public void RemovingActivityListMovesRelatedActivitiesToInBox()
        {
            var          board            = new ActivityBoard();
            string       activityListName = "Doing";
            ActivityList list             = board.AddNewList(activityListName);
            Activity     activity         = Activity.FluentNew("New Activity").AddToBoard(board);

            board.MoveActivity(activity).ToList(list);
            board.RemoveList(list);
            Assert.That(board.InBox.Activities, Is.Not.Empty);
        }
        public void CannotMoveActivityNotBelongingToBoard()
        {
            var      board    = new ActivityBoard();
            Activity activity = Activity.FluentNew("An Activity")
                                .ActiveDueDate(new DateTime(2017, 2, 28))
                                .DailyLeadTime(3)
                                .Recurrence(ERecurFromType.FromActiveDueDate, x => x.Daily(14))
                                .ToActivity;
            ActivityList list = board.AddNewList("Doing");

            Assert.That(() => board.MoveActivity(activity).ToList(list), Throws.TypeOf <ArgumentException>());
        }
        public void CanMoveActivityToActivityList()
        {
            var      board    = new ActivityBoard();
            Activity activity = Activity.FluentNew("An Activity")
                                .ActiveDueDate(new DateTime(2017, 2, 28))
                                .DailyLeadTime(3)
                                .Recurrence(ERecurFromType.FromActiveDueDate, x => x.Daily(14))
                                .AddToBoard(board)
                                .ToActivity;
            ActivityList list = board.AddNewList("Doing");

            board.MoveActivity(activity).ToList(list);
            Assert.That(list.Activities, Has.Member(activity));
            Assert.That(board.InBox.Activities, Has.No.Member(activity));
        }