Пример #1
0
 private void Apply(TemplateDetailsUpdated @event)
 {
     Name        = @event.Name;
     Description = @event.Description;
     ViewName    = @event.ViewName;
     Type        = @event.Type;
 }
Пример #2
0
 public void Setup()
 {
     _command = new UpdateTemplateDetails
     {
         Id          = Guid.NewGuid(),
         Name        = "Name",
         Description = "Description",
         ViewName    = "viewName"
     };
     _validatorMock = new Mock <IValidator <UpdateTemplateDetails> >();
     _validatorMock.Setup(x => x.Validate(_command)).Returns(new ValidationResult());
     _template = new Template();
     _template.UpdateDetails(_command, _validatorMock.Object);
     _event = _template.Events.OfType <TemplateDetailsUpdated>().SingleOrDefault();
 }