Пример #1
0
        public void Process_NewDepartmentEvent_SetsNAmeAndId()
        {
            var id = Guid.NewGuid();
            var @event = new NewDepartmentEvent(id, "Test Department");
            var department = new Department();
            department.Process(@event);

            Assert.Equal(id, department.Id);
            Assert.Equal("Test Department", department.Name);
        }
Пример #2
0
 public void Process(NewDepartmentEvent @event)
 {
     this.Id = @event.DepartmentId;
     this.Name = @event.Name;
     this.IsActive = true;
 }