示例#1
0
        public void ManyResolverCannotClearOnceFrozen()
        {
            var resolver = new ManyResolver();

            resolver.AddType <Resolved1>();
            resolver.AddType <Resolved2>();
            Resolution.Freeze();
            resolver.Clear();
        }
示例#2
0
        public void ManyResolverCannotClearOnceFrozen()
        {
            var resolver = new ManyResolver(new ActivatorServiceProvider(), Mock.Of <ILogger>());

            resolver.AddType <Resolved1>();
            resolver.AddType <Resolved2>();
            Resolution.Freeze();
            resolver.Clear();
        }
示例#3
0
        public void ManyResolverCanClearBeforeFreeze()
        {
            var resolver = new ManyResolver();

            resolver.AddType <Resolved1>();
            resolver.AddType <Resolved2>();
            resolver.Clear();
            Assert.IsFalse(resolver.ContainsType <Resolved1>());
            Assert.IsFalse(resolver.ContainsType <Resolved2>());
        }
示例#4
0
        public void ManyResolverCanClearBeforeFreeze()
        {
            var resolver = new ManyResolver(new ActivatorServiceProvider(), Mock.Of <ILogger>());

            resolver.AddType <Resolved1>();
            resolver.AddType <Resolved2>();
            resolver.Clear();
            Assert.IsFalse(resolver.ContainsType <Resolved1>());
            Assert.IsFalse(resolver.ContainsType <Resolved2>());
        }