private async Task Renamed_CustomField_Persistes_The_New_Name() { // GIVEN a custom field var customFieldRef = await CreateSampleCustomField(); // WHEN renaming it var response = await _commandService.Rename(customFieldRef.Id, new CustomFieldRenameRequest { Name = "New name" }); await SaveChanges(); // THEN // renaming was succesful Assert.True(response.IsSuccess); // the entity appears in the DB with the new name var record = await _queryService.GetArray(new CustomFieldListGetRequest { Ids = new[] { customFieldRef.Id } }); Assert.Single(record); Assert.Equal("New name", record.Single().Name); }
public Task <ActionResult <CustomFieldReferenceDto> > Update([FromServices] ICustomFieldCommandService service, [FromRoute] string id, CustomFieldRenameRequest dto ) => service.Rename(id, dto).ToActionResultOfT();