public async Task EntityWriter_CreateAsync() { var customer = MemorySeeder.SeedCustomerDto(); var result = await _client.PostAsync <CustomerDto>( request => request.AddResource("create").WithBody(customer)); Assert.IsNotNull(result); Assert.IsInstanceOf(typeof(CustomerDto), result); }
public void EntityWriter_Create() { var customer = MemorySeeder.SeedCustomerDto(); var result = _client.Post( request => request.AddResource("create") .WithBody(customer)) .As <CustomerDto>(); Assert.IsNotNull(result); Assert.IsInstanceOf(typeof(CustomerDto), result); }