示例#1
0
        public void ResolveType()
        {
            //IoCContainer container = new IoCContainer();
            _container.Register <IRegisterableType, ResolvedType>();

            //Primeira Definiçaõ de TDD Não Existe "Resolve"
            //Need Resolve method
            IRegisterableType instance = _container.Resolve <IRegisterableType>();

            Assert.IsNotNull(instance);
            Assert.IsTrue(instance.GetType() == typeof(ResolvedType));
        }
示例#2
0
        public void Resolve_Type()
        {
            //Checing It the Container is REsolving the Type

            //Arrange
            _container.Register <INotifier, Notifier>();

            //Action
            INotifier instance = _container.Resolve <INotifier>();

            //Assert
            Assert.IsNotNull(instance);
            Assert.IsTrue(instance.GetType() == typeof(Notifier));
        }