public void RegisterSingleton_Success()
        {
            ITestCase testCase = new SingletonTestCaseC(new AutofacRegistration(), new AutofacResolving());

            var cb = new ContainerBuilder();
            var c  = (IContainer)testCase.Register(cb, RegistrationKind.Singleton);

            var obj1 = c.Resolve <ITestC>();
            var obj2 = c.Resolve <ITestC>();


            CheckHelper.Check(obj1, true, true);
            CheckHelper.Check(obj2, true, true);
            CheckHelper.Check(obj1, obj2, true, true);
        }
        public void RegisterSingleton_Success()
        {
            ITestCase testCase = new SingletonTestCaseC(new NinjectRegistration(), new NinjectResolving());


            var c = new StandardKernel();

            c = (StandardKernel)testCase.Register(c, RegistrationKind.Singleton);

            var obj1 = c.Get <ITestC>();
            var obj2 = c.Get <ITestC>();


            CheckHelper.Check(obj1, true, true);
            CheckHelper.Check(obj2, true, true);
            CheckHelper.Check(obj1, obj2, true, true);
        }
        public void RegisterSingleton_Success()
        {
            ITestCase testCase = new SingletonTestCaseC(new StructureMapRegistration(), new StructureMapResolving());


            var c = new Container();

            c = (Container)testCase.Register(c, RegistrationKind.Singleton);

            var obj1 = c.GetInstance <ITestC>();
            var obj2 = c.GetInstance <ITestC>();


            CheckHelper.Check(obj1, true, true);
            CheckHelper.Check(obj2, true, true);
            CheckHelper.Check(obj1, obj2, true, true);
        }
        public void RegisterSingleton_Success()
        {
            ITestCase testCase = new SingletonTestCaseC(new UnityRegistration(), new UnityResolving());


            var c = new UnityContainer();

            c = (UnityContainer)testCase.Register(c, RegistrationKind.Singleton);

            var obj1 = c.Resolve <ITestC>();
            var obj2 = c.Resolve <ITestC>();


            CheckHelper.Check(obj1, true, true);
            CheckHelper.Check(obj2, true, true);
            CheckHelper.Check(obj1, obj2, true, true);
        }
        public void RegisterSingleton_Success()
        {
            ITestCase testCase = new SingletonTestCaseC(new GraceRegistration(), new GraceResolving());

            var c = new DependencyInjectionContainer();

            c = (DependencyInjectionContainer)testCase.Register(c, RegistrationKind.Singleton);


            var obj1 = c.Locate <ITestC>();
            var obj2 = c.Locate <ITestC>();


            CheckHelper.Check(obj1, true, true);
            CheckHelper.Check(obj2, true, true);
            CheckHelper.Check(obj1, obj2, true, true);
        }
        public void RegisterSingleton_Success()
        {
            ITestCase testCase = new SingletonTestCaseC(new NiquIoCFullRegistration(), new NiquIoCFullResolving());


            var c = new Container();

            c = (Container)testCase.Register(c, RegistrationKind.Singleton);

            var obj1 = c.Resolve <ITestC>(ResolveKind.FullEmitFunction);
            var obj2 = c.Resolve <ITestC>(ResolveKind.FullEmitFunction);


            CheckHelper.Check(obj1, true, true);
            CheckHelper.Check(obj2, true, true);
            CheckHelper.Check(obj1, obj2, true, true);
        }