protected override void Given() { var userRegistered = ProcessedEvent(new UserRegistered(Guid.NewGuid(), Guid.NewGuid() + "@test.dk", "1234")); var task1Created = ProcessedEvent(new TaskCreated("Task 1", Guid.NewGuid(), userRegistered.UserId, Guid.Empty, DateTime.UtcNow)); var task2Created = ProcessedEvent(new TaskCreated("Task 2", Guid.NewGuid(), userRegistered.UserId, Guid.Empty, DateTime.UtcNow)); _taskNested = new TaskNested(userRegistered.UserId, task2Created.TaskId, task1Created.TaskId, DateTime.UtcNow); }
// FROM: // - task 1 // - task 2 // - task 3 // - task 4 // // TO: // - task 1 // - task 2 // - task 3 // - task 4 protected override void Given() { var userRegistered = ProcessedEvent(new UserRegistered(Guid.NewGuid(), Guid.NewGuid() + "@test.dk", "1234")); var task1Created = ProcessedEvent(new TaskCreated("Parent", Guid.NewGuid(), userRegistered.UserId, Guid.Empty, DateTime.UtcNow)); var task2Created = ProcessedEvent(new TaskCreated("Child 1", Guid.NewGuid(), userRegistered.UserId, Guid.Empty, DateTime.UtcNow)); var task3Created = ProcessedEvent(new TaskCreated("Child 2", Guid.NewGuid(), userRegistered.UserId, Guid.Empty, DateTime.UtcNow)); var task4Created = ProcessedEvent(new TaskCreated("Child 3", Guid.NewGuid(), userRegistered.UserId, Guid.Empty, DateTime.UtcNow)); ProcessedEvent(new TaskNested(userRegistered.UserId, task2Created.TaskId, task1Created.TaskId, DateTime.UtcNow)); ProcessedEvent(new TaskNested(userRegistered.UserId, task3Created.TaskId, task2Created.TaskId, DateTime.UtcNow)); ProcessedEvent(new TaskNested(userRegistered.UserId, task4Created.TaskId, task1Created.TaskId, DateTime.UtcNow)); _previousParentTaskId = task2Created.TaskId; _taskNested = new TaskNested(userRegistered.UserId, task3Created.TaskId, task1Created.TaskId, DateTime.UtcNow); }
private void Apply(TaskNested evt) { }