Пример #1
0
        public void Throw_Activate_NotRegistered()
        {
            var provider = new DependencyCollection().BuildProvider();

            Assert.Throws <KeyNotFoundException>(() => provider.Activate <FooRepository>());
        }
Пример #2
0
        public void Throw_Activate_Interface()
        {
            var provider = new DependencyCollection().BuildProvider();

            Assert.Throws <InvalidOperationException>(() => provider.Activate <ISession>());
        }