示例#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);
        }
示例#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);
 }
示例#3
0
文件: Task.cs 项目: rasmuskl/Tasks
 private void Apply(TaskCreated evt)
 {
     _taskId = evt.TaskId;
 }