public void MultipleDefinitionTest() {
	        var mcd = new ManifestClassDefinition(typeof(TestServiceBaseForManifestClassTest2));
	        var components = mcd.GetComponents().ToArray();
            Assert.AreEqual(4,components.Length);
            Assert.True(components.Any(_=>_.Name=="a" && _.ServiceType==typeof(ITestServiceForManifestClassTest)));
            Assert.True(components.Any(_=>_.Name=="a" && _.ServiceType==typeof(ITestServiceForManifestClassTest2)));
            Assert.True(components.Any(_=>_.Name=="b" && _.ServiceType==typeof(ITestServiceForManifestClassTest)));
            Assert.True(components.Any(_=>_.Name=="b" && _.ServiceType==typeof(ITestServiceForManifestClassTest2)));
	    }
	    public void JoinedSingletonInstantiation() {
	        var mcd = new ManifestClassDefinition(typeof(TestServiceBaseForManifestClassTest3));
	        var components = mcd.GetComponents().ToArray();
	        var c = new Container();
	        foreach (var component  in components) {
	            c.Register(component);
	        }
	        var srv = c.Get<object>("a");
	        var srv2 = c.Get<object>("b");
            Assert.AreSame(srv,srv2);
	    }
        public void MultipleDefinitionTest()
        {
            var mcd        = new ManifestClassDefinition(typeof(TestServiceBaseForManifestClassTest2));
            var components = mcd.GetComponents().ToArray();

            Assert.AreEqual(4, components.Length);
            Assert.True(components.Any(_ => _.Name == "a" && _.ServiceType == typeof(ITestServiceForManifestClassTest)));
            Assert.True(components.Any(_ => _.Name == "a" && _.ServiceType == typeof(ITestServiceForManifestClassTest2)));
            Assert.True(components.Any(_ => _.Name == "b" && _.ServiceType == typeof(ITestServiceForManifestClassTest)));
            Assert.True(components.Any(_ => _.Name == "b" && _.ServiceType == typeof(ITestServiceForManifestClassTest2)));
        }
        public void JoinedSingletonInstantiation()
        {
            var mcd        = new ManifestClassDefinition(typeof(TestServiceBaseForManifestClassTest3));
            var components = mcd.GetComponents().ToArray();
            var c          = new Container();

            foreach (var component  in components)
            {
                c.Register(component);
            }
            var srv  = c.Get <object>("a");
            var srv2 = c.Get <object>("b");

            Assert.AreSame(srv, srv2);
        }
 public void MultiServiceMultiAttributes()
 {
     var mcd = new ManifestClassDefinition(typeof(TestServiceBaseForManifestClassTest4));
     var components = mcd.GetComponents().ToArray();
     Assert.AreEqual(2,components.Length);
     var c = new Container();
     foreach (var component in components)
     {
         c.Register(component);
     }
     var srv = c.Get<ITestServiceForManifestClassTest>();
     var srv2 = c.Get<ITestServiceForManifestClassTest2>();
     Assert.IsInstanceOf<TestServiceBaseForManifestClassTest4>(srv);
     Assert.IsInstanceOf<TestServiceBaseForManifestClassTest4>(srv2);
     Assert.AreNotSame(srv, srv2);
 }
        public void MultiServiceMultiAttributes()
        {
            var mcd        = new ManifestClassDefinition(typeof(TestServiceBaseForManifestClassTest4));
            var components = mcd.GetComponents().ToArray();

            Assert.AreEqual(2, components.Length);
            var c = new Container();

            foreach (var component in components)
            {
                c.Register(component);
            }
            var srv  = c.Get <ITestServiceForManifestClassTest>();
            var srv2 = c.Get <ITestServiceForManifestClassTest2>();

            Assert.IsInstanceOf <TestServiceBaseForManifestClassTest4>(srv);
            Assert.IsInstanceOf <TestServiceBaseForManifestClassTest4>(srv2);
            Assert.AreNotSame(srv, srv2);
        }
		public void InterfaceResolvedWell() {
			var mcd = new ManifestClassDefinition(typeof (TestServiceBaseForManifestClassTest));
			Assert.AreEqual(typeof (ITestServiceForManifestClassTest), mcd.GetComponents().FirstOrDefault().ServiceType);
		}
        public void InterfaceResolvedWell()
        {
            var mcd = new ManifestClassDefinition(typeof(TestServiceBaseForManifestClassTest));

            Assert.AreEqual(typeof(ITestServiceForManifestClassTest), mcd.GetComponents().FirstOrDefault().ServiceType);
        }