public void GetServiceHost_UnregisteredService()
        {
            try
            {
                IWhippedCreamDataLayer dl = new WhippedCreamDataLayer();
                WhippedCreamDataLayer.Container = new UnityContainer();

                WhippedCreamDataLayer.Container = new UnityContainer();
                WhippedCreamDataLayer.Container.RegisterInstance<IUrlService>(new DefaultUrlService(new System.Uri("http://localhost"), null));

                dl.GetServiceHost<ITestRepositoryTwo>();
                Assert.Fail(@"
            System.InvalidOperationException expected because the repository has not registered a service.
            ");
            }
            catch (System.InvalidOperationException) { }
        }
        public void GetServiceHost_ReturnsWhippedCreamDataServiceHost()
        {
            IWhippedCreamDataLayer dl = new WhippedCreamDataLayer();
            WhippedCreamDataLayer.Container = new UnityContainer();

            WhippedCreamDataLayer.Container = new UnityContainer();
            WhippedCreamDataLayer.Container.RegisterInstance<IUrlService>(new DefaultUrlService(new System.Uri("http://localhost"), null));

            Assert.IsInstanceOf<WhippedCreamDataServiceHost>(dl.GetServiceHost<ITestRepositoryOne>(),
                "The returned object is not an instance of WhippedCreamDataServiceHost.");
        }