public void TestGetPhoneByMasterId() { int masterId = 504438; IUnityContainer container = GenericSingleton <ComponentContainer> .GetInstance().Container; IDomainFactory factory = container.Resolve <PhoneFactory>(); Phone ph = (Phone)factory.GetBusinessEntityByMasterEntityId(masterId); Assert.AreEqual(masterId, ph.customerId); }