private void Apply(TemplateDetailsUpdated @event) { Name = @event.Name; Description = @event.Description; ViewName = @event.ViewName; Type = @event.Type; }
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(); }