void CheckServicesImplementation(ISupportServices services) { var parent = CustomSupportServicesImplementation.Create(); ((ISupportParentViewModel)services).ParentViewModel = parent; var service1 = new Service1(); services.ServiceContainer.RegisterService(service1); var service2 = new Service2(); ((ISupportServices)parent).ServiceContainer.RegisterService(service2); Assert.Same(service1, services.GetService <IService1>()); Assert.Same(service1, services.ServiceContainer.GetService <IService1>()); Assert.Same(service2, services.GetService <IService2>()); Assert.Same(service2, services.ServiceContainer.GetService <IService2>()); }
public void CustomSupportServicesImplementationTest() { CheckServicesImplementation(CustomSupportServicesImplementation.Create()); }