Example #1
0
 public static void SetOrderingParty_NullOrder_ThrowsException(
     OrderingParty orderingParty,
     Contact contact,
     OrderingPartyService service)
 {
     Assert.ThrowsAsync <ArgumentNullException>(async() => await service.SetOrderingParty(null, orderingParty, contact));
 }
Example #2
0
 public static void SetOrderingParty_NullContact_ThrowsException(
     Order order,
     OrderingParty orderingParty,
     OrderingPartyService service)
 {
     Assert.ThrowsAsync <ArgumentNullException>(async() => await service.SetOrderingParty(order, orderingParty, null));
 }
Example #3
0
        public static async Task SetOrderingParty_UpdatesOrderingParty(
            Order order,
            OrderingParty orderingParty,
            Contact contact,
            OrderingPartyService service)
        {
            order.OrderingParty.Name.Should().NotBe(orderingParty.Name);
            order.OrderingParty.OdsCode.Should().NotBe(orderingParty.OdsCode);
            order.OrderingParty.Address.Should().NotBe(orderingParty.Address);
            order.OrderingPartyContact.Should().NotBe(contact);

            await service.SetOrderingParty(order, orderingParty, contact);

            order.OrderingParty.Name.Should().Be(orderingParty.Name);
            order.OrderingParty.OdsCode.Should().Be(orderingParty.OdsCode);
            order.OrderingParty.Address.Should().Be(orderingParty.Address);
            order.OrderingPartyContact.Should().Be(contact);
        }