public async Task ThenTheOrderWithOrderIdHasContactData(int orderId, Table table)
        {
            var expected = table.CreateInstance <ContactEntity>();

            var order = await OrderEntity.FetchOrderByOrderId(settings.ConnectionString, orderId);

            var actual = await ContactEntity.FetchContactById(settings.ConnectionString, order.OrderingPartyContactId);

            actual.Should().BeEquivalentTo(expected, options => options.Excluding(c => c.Id));
        }
Ejemplo n.º 2
0
        public async Task ThenTheOrderWithOrderIdHasContactData(string orderId, Table table)
        {
            var expected = table.CreateInstance <ContactEntity>();

            var order = await OrderEntity.FetchOrderByOrderId(_settings.ConnectionString, orderId);

            var actual = await ContactEntity.FetchContactById(_settings.ConnectionString, order.OrganisationContactId);

            actual.Should().BeEquivalentTo(expected);
        }
Ejemplo n.º 3
0
        public async Task ThenTheSupplierContactIdContactForOrderIs(string orderId, Table table)
        {
            var contact = table.CreateInstance <SupplierContactTable>();

            var contactId = (int)(await OrderEntity.FetchOrderByOrderId(_settings.ConnectionString, orderId))
                            .SupplierContactId;

            var actual = await ContactEntity.FetchContactById(_settings.ConnectionString, contactId);

            actual.Should().BeEquivalentTo(contact);
        }