Exemple #1
0
        protected override void Given()
        {
            var userRegistered = new UserRegistered(Guid.NewGuid(), "*****@*****.**", "1234");
            var task1Created = new TaskCreated("task 1", Guid.NewGuid(), userRegistered.UserId, Guid.Empty, DateTime.Now);
            var task2Created = new TaskCreated("task 2", Guid.NewGuid(), userRegistered.UserId, Guid.Empty, DateTime.Now);

            _userId = userRegistered.UserId;
            _task1Id = task1Created.TaskId;
            _task2Id = task2Created.TaskId;

            AddToHistory(_userId, userRegistered);
            AddToHistory(_task1Id, task1Created);
            AddToHistory(_task2Id, task2Created);
        }
Exemple #2
0
 protected override void Given()
 {
     var userRegistered = ProcessedEvent(new UserRegistered(Guid.NewGuid(), "*****@*****.**", "1234"));
     _taskCreated = new TaskCreated("Task 1", Guid.NewGuid(), userRegistered.UserId, Guid.Empty, DateTime.Now);
 }
Exemple #3
0
 private void Apply(TaskCreated evt)
 {
     _taskId = evt.TaskId;
 }