public void Should_be_able_to_register_type_catalog()
        {
            var catalog = new TypeCatalogBuilder().Add(GetType().Assembly)
                                                  .Include(t => typeof(Controller).IsAssignableFrom(t));

            registry.Object.Register<DummyActionInvoker>(catalog);

            registry.Verify(r => r.Register(It.Is<Type>(t => typeof(Controller).IsAssignableFrom(t)), typeof(DummyActionInvoker)), Times.Exactly(2));
        }
        public void Should_be_able_to_register_type_catalog()
        {
            var catalog = new TypeCatalogBuilder().Add(GetType().Assembly)
                          .Include(t => typeof(Controller).IsAssignableFrom(t));

            registry.Object.Register <DummyActionInvoker>(catalog);

            registry.Verify(r => r.Register(It.Is <Type>(t => typeof(Controller).IsAssignableFrom(t)), typeof(DummyActionInvoker)), Times.Exactly(2));
        }
示例#3
0
 public TypeCatalogBuilderTests()
 {
     builder = new TypeCatalogBuilder();
 }
示例#4
0
 public TypeCatalogBuilderTests()
 {
     builder = new TypeCatalogBuilder();
 }