Exemple #1
0
        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);
        }
Exemple #2
0
        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);
        }