public async Task ThenTheSupplierForOrderIsUpdated(int orderId, Table table) { var expectedSupplier = table.CreateInstance <SupplierSectionTable>(); var order = await OrderEntity.FetchOrderByOrderId(settings.ConnectionString, orderId); var supplier = await SupplierEntity.FetchById(settings.ConnectionString, order.SupplierId); var actual = new { order.SupplierId, SupplierName = supplier.Name }; actual.Should().BeEquivalentTo(expectedSupplier); }
public async Task ThenTheSupplierAddressForOrderIs(int orderId, Table table) { var order = await OrderEntity.FetchOrderByOrderId(settings.ConnectionString, orderId); var supplier = await SupplierEntity.FetchById(settings.ConnectionString, order.SupplierId); var actual = await AddressEntity.FetchAddressById(settings.ConnectionString, supplier.AddressId); var address = table.CreateInstance <SupplierAddressTable>(); actual.Should().BeEquivalentTo(address); }