public void ShouldFailNotFound() { var command = new UpdateStoreUser { Id = "asdwqedg" }; FluentActions.Invoking(() => SendAsync(command)).Should().Throw <NotFoundException>(); }
public async Task ShouldUpdateAsync() { var id = await GetRandomOwner(); var commad = new UpdateStoreUser { Id = id, NewUsername = "******", Password = "******", NewPassword = "******" }; FluentActions.Invoking(() => SendAsync(commad)).Should().NotThrow(); }
public async Task <IActionResult> Update([FromForm] UpdateStoreUser update) { try { await Mediator.Send(update); return(Ok()); } catch (Exception e) { return(BadRequestWithMessage(e.Message)); } }
public static Task UpdateStoreUser(this IFlurlClient http, UpdateStoreUser model) { return(http.Request("api", "storeuser", "update") .PostUrlEncodedAsync(model)); }