public async Task AsyncEntityWriter_AddAsync() { var customer = MemorySeeder.SeedCustomer(); var successed = await _writer.AddAsync(customer); Assert.IsTrue(successed); Assert.IsTrue(customer.Id.IsNotZeroOrEmpty()); var result = await _reader.FirstOrDefaultAsync(customer.Id); Assert.IsNotNull(result); Assert.IsInstanceOf(typeof(Customer), result); }
public void EntityWriter_Add() { var customer = MemorySeeder.SeedCustomer(); var successed = _writer.Add(customer); Assert.IsTrue(successed); Assert.IsTrue(customer.Id.IsNotZeroOrEmpty()); var result = _reader.FirstOrDefault(customer.Id); Assert.IsNotNull(result); Assert.IsInstanceOf(typeof(Customer), result); }