Ejemplo n.º 1
0
        public void Register_Should_Get_Services()
        {
            var container = new Container.Container();

            var service = new AutoIdRepository();

            container.Register(service);

            Assert.NotNull(container.Get <IAutoIdRepository>());
        }
Ejemplo n.º 2
0
        public void Container_Should_Return_IRepository_Of_Type()
        {
            var container = new Container.Container();

            container.Register <DummyRepository>();

            var verify = container.Get <IRepository <DummyEntity> >();

            Assert.NotNull(verify);
            Assert.True(verify is IRepository <DummyEntity>);
        }