Esempio n. 1
0
        public void SimpleInjectorResolveSingleInstance()
        {
            var container  = new global::SimpleInjector.Container();
            var registered = new Registered();

            container.RegisterSingle(typeof(Registered), registered);

            var resolver = new SimpleInjectorDependencyResolver(container);

            var resolved = resolver.GetInstance(typeof(Registered));

            Assert.That(resolved, Is.EqualTo(registered));
        }
Esempio n. 2
0
	    public void SimpleInjectorResolveSingleInstance()
	    {
		    var container = new global::SimpleInjector.Container();
		    var registered = new Registered();
			container.RegisterSingle(typeof(Registered), registered);

		    var resolver = new SimpleInjectorDependencyResolver(container);
		    
			var resolved = resolver.GetInstance(typeof (Registered));

			Assert.That(resolved, Is.EqualTo(registered));
	    }