Esempio n. 1
0
 public TaskCreated(Guid id, Guid planId, string title, Reccurence interval)
 {
     Id       = id;
     PlanId   = planId;
     Title    = title;
     Interval = interval;
 }
Esempio n. 2
0
 public CreateTask(PlanId planId, TaskId taskId, string name, Reccurence interval)
 {
     PlanId   = (Guid)planId;
     TaskId   = (Guid)taskId;
     Name     = name;
     Interval = interval;
 }
Esempio n. 3
0
 private void Apply(TaskCreated e)
 {
     Id       = e.Id;
     planId   = e.PlanId;
     Title    = e.Title;
     interval = e.Interval;
 }
Esempio n. 4
0
        public void WhenMarkedAsCompleted_ThenItSetsDateIntervals(
            Reccurence reccurence,
            DateTime completionDate,
            DateTime expectedReapperance)
        {
            // Arrange
            var sut = new Assignment(string.Empty, reccurence);

            // Act
            sut.MarkAsCompleted(completionDate);

            // Assert
            Assert.Equal(expectedReapperance.ToString("O"), sut.DateInterval.Reapperance.ToString("O"));
        }
Esempio n. 5
0
 public Assignment(string summary, Reccurence interval)
 {
     Summary      = summary;
     Interval     = interval;
     DateInterval = new DateWindow(DateTime.Now, DateTime.Now.AddDays(3));
 }
Esempio n. 6
0
 public Task(TaskId id, PlanId planId, string title, Reccurence taskType)
     : base(id)
 {
     AcceptChange(new TaskCreated(id, planId, title, taskType));
 }