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));
        }
Esempio 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);
        }
Esempio 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);
        }