public void when_resolving_whats_is_not_there_should_wrap_original_exception_with_container_exception()
        {
            var sut = new CastleContainerAdapter();

            sut.Get <given_a_simple_container.Interfaze>();
            Assert.Fail("Should have thrown an exception");
        }
        public void when_resolving_with_type_obviously_should_delegate_to_underlying_container()
        {
            var inner = new Mock <IWindsorContainer>(MockBehavior.Loose);
            var sut   = new CastleContainerAdapter(inner.Object);

            sut.Get(typeof(given_a_simple_container.Interfaze));

            inner.Verify(x => x.Resolve(It.Is <Type>(x1 => x1.Equals(typeof(given_a_simple_container.Interfaze)))));
        }
        public void when_resolving_obviously_should_delegate_to_underlying_container()
        {
            var inner = new Mock <IWindsorContainer>(MockBehavior.Loose);
            var sut   = new CastleContainerAdapter(inner.Object);

            sut.Get <given_a_simple_container.Interfaze>();

            inner.Verify(x => x.Resolve <given_a_simple_container.Interfaze>());
        }
        public void when_resolving_obviously_should_delegate_to_underlying_container()
        {
            var inner = new Mock<IWindsorContainer>(MockBehavior.Loose);
            var sut = new CastleContainerAdapter(inner.Object);

            sut.Get<given_a_simple_container.Interfaze>();

            inner.Verify(x => x.Resolve<given_a_simple_container.Interfaze>());
        }
        public void when_resolving_with_name_obviously_should_delegate_to_underlying_container()
        {
            var inner = new Mock <IWindsorContainer>(MockBehavior.Loose);
            var sut   = new CastleContainerAdapter(inner.Object);

            sut.Get <given_a_simple_container.Interfaze>("anonymousName");

            inner.Verify(
                x => x.Resolve <given_a_simple_container.Interfaze>(It.Is <string>(x1 => x1.Equals("anonymousName"))));
        }
        public void when_resolving_with_name_obviously_should_delegate_to_underlying_container()
        {
            var inner = new Mock<IWindsorContainer>(MockBehavior.Loose);
            var sut = new CastleContainerAdapter(inner.Object);

            sut.Get<given_a_simple_container.Interfaze>("anonymousName");

            inner.Verify(
                x => x.Resolve<given_a_simple_container.Interfaze>(It.Is<string>(x1 => x1.Equals("anonymousName"))));
        }
        public void when_resolving_with_type_obviously_should_delegate_to_underlying_container()
        {
            var inner = new Mock<IWindsorContainer>(MockBehavior.Loose);
            var sut = new CastleContainerAdapter(inner.Object);

            sut.Get(typeof(given_a_simple_container.Interfaze));

            inner.Verify(x => x.Resolve(It.Is<Type>(x1 => x1.Equals(typeof (given_a_simple_container.Interfaze)))));
        }
 public void when_resolving_whats_is_not_there_should_wrap_original_exception_with_container_exception()
 {
     var sut = new CastleContainerAdapter();
     sut.Get<given_a_simple_container.Interfaze>();
     Assert.Fail("Should have thrown an exception");
 }