コード例 #1
0
        public void IsRegistered_Should_Return_False()
        {
            var resolver = new UnityDependencyResolver();
            resolver.RegisterType<IFace1, Class1>();
            resolver.RegisterType<IFace1, Class2>();
            resolver.RegisterInstance<IFace1>(new Class3());

            var result = resolver.IsRegistered<Class3>();
            Assert.IsFalse(result);
        }
コード例 #2
0
        public void IsRegistered_Should_Return_False()
        {
            var resolver = new UnityDependencyResolver();

            resolver.RegisterType <IFace1, Class1>();
            resolver.RegisterType <IFace1, Class2>();
            resolver.RegisterInstance <IFace1>(new Class3());

            var result = resolver.IsRegistered <Class3>();

            Assert.IsFalse(result);
        }