public void SetTheCustomerReferenceForThisOrderOk() { //Arrange(Preparar) OrderIncome order = OrderFactory.CreateOrder(_customer, "", "", ""); string lastName = "El rojo"; string firstName = "Jhon"; string telephone = "+34111111"; string company = "company name"; Customer customernew = CustomerFactory.CreateCustomer(firstName, lastName, telephone, company, "*****@*****.**", _country, new Address("city", "zipcode", "AddressLine1", "AddressLine2")); //Act(Actuar) order.CustomerId.ShouldBe(_customer.Id); order.SetTheCustomerReferenceForThisOrder(customernew.Id); //Assert(Afirmar) order.CustomerId.ShouldBe(customernew.Id); }
public void SetTheCustomerReferenceForThisOrderFail() { //Arrange(Preparar) OrderIncome order = OrderFactory.CreateOrder(_customer, "", "", ""); string lastName = "El Negro"; string firstName = "Alex"; string telephone = "+34111111"; string company = "company name"; Customer customernew = CustomerFactory.CreateCustomer(firstName, lastName, telephone, company, "*****@*****.**", _country, new Address("city", "zipcode", "AddressLine1", "AddressLine2")); //Act(Actuar) order.CustomerId.ShouldBe(_customer.Id); //Assert(Afirmar) Should.Throw <Exception>(() => { order.SetTheCustomerReferenceForThisOrder(Guid.Empty); }); }