public void SingleObjectUnkownLevelBoycott ( ) { var country = new Country { Name = "Serbia", Iso2 = "RS", IsoAlpha3 = "SRB", IsoUnM49Numerical = 688 }; var address = new Address { City = "Belgrade", Street = "Bulevar Kralja Aleksandra, 15", Country = country }; var consignee = new Consignee { Name = "Dimitrovgrad", Address = address }; var res = consignee.Boycott(x => x.Address.Country.Name); Assert.Catch<RuntimeBinderException>( ( ) => { Console.Write(res.Address.Country.Name); }); }
public void SingleObjectUnkownLevelSanction ( ) { var country = new Country { Name = "Serbia", Iso2 = "RS", IsoAlpha3 = "SRB", IsoUnM49Numerical = 688 }; var address = new Address { City = "Belgrade", Street = "Bulevar Kralja Aleksandra, 15", Country = country }; var consignee = new Consignee { Name = "Dimitrovgrad", Address = address }; var res = consignee.Sanction(x => x.Address.Country.Name); Assert.That(res.Address.Country.Name == consignee.Address.Country.Name); }