public static void CanConfigurePreviewUrls(ConfigurePreviewUrls command) { Guard.NotNull(command, nameof(command)); Validate.It(() => "Cannot configure preview urls.", error => { if (command.PreviewUrls == null) { error("Preview Urls is required.", nameof(command.PreviewUrls)); } }); }
public static void CanConfigurePreviewUrls(ConfigurePreviewUrls command) { Guard.NotNull(command, nameof(command)); Validate.It(e => { if (command.PreviewUrls == null) { e(Not.Defined(nameof(command.PreviewUrls)), nameof(command.PreviewUrls)); } }); }
public async Task ConfigurePreviewUrls_should_create_events_and_update_state() { var command = new ConfigurePreviewUrls { PreviewUrls = new Dictionary<string, string> { ["Web"] = "web-url" } }; await ExecuteCreateAsync(); var result = await sut.ExecuteAsync(CreateCommand(command)); result.ShouldBeEquivalent(sut.Snapshot); Assert.Equal(command.PreviewUrls, sut.Snapshot.SchemaDef.PreviewUrls); LastEvents .ShouldHaveSameEvents( CreateEvent(new SchemaPreviewUrlsConfigured { PreviewUrls = command.PreviewUrls }) ); }
public void ConfigurePreviewUrls(ConfigurePreviewUrls command) { RaiseEvent(command, new SchemaPreviewUrlsConfigured()); }
private void ConfigurePreviewUrls(ConfigurePreviewUrls command) { Raise(command, new SchemaPreviewUrlsConfigured()); }
public void ConfigurePreviewUrls(ConfigurePreviewUrls command) { RaiseEvent(SimpleMapper.Map(command, new SchemaPreviewUrlsConfigured())); }