private ObjectDef verifyDefaultType <TService, TConcrete>()
        {
            var def = theGraph.DefaultServiceFor <TService>();

            def.Type.ShouldEqual(typeof(TConcrete));

            return(def);
        }
Example #2
0
 private void theDefaultServiceIs <TPlugin, TImplementation>()
 {
     theServiceGraph.DefaultServiceFor <TPlugin>()
     .Type.ShouldEqual(typeof(TImplementation));
 }
 public void template_registry()
 {
     _services.DefaultServiceFor <ITemplateRegistry <ITemplate> >()
     .Value.ShouldBeOfType <TemplateRegistry <ITemplate> >();
 }
Example #4
0
 public void default_resource_not_found_handler_is_registered()
 {
     theServices.DefaultServiceFor <IResourceNotFoundHandler>()
     .Type.ShouldEqual(typeof(DefaultResourceNotFoundHandler));
 }
Example #5
0
 public void coffee_compiler()
 {
     _services
     .DefaultServiceFor <ICoffeeCompiler>()
     .ShouldNotBeNull();
 }
Example #6
0
 public void sass_compiler()
 {
     _services.DefaultServiceFor <ISassCompiler>().ShouldNotBeNull()
     .Type.ShouldEqual(typeof(DefaultSassCompiler));
 }
 private void registeredTypeIs <TService, TImplementation>()
 {
     _serviceGraph.DefaultServiceFor <TService>().Type.ShouldEqual(
         typeof(TImplementation));
 }
Example #8
0
 public void less_engine()
 {
     _services.DefaultServiceFor <ILessEngine>()
     .Value.ShouldBeOfType <LessEngine>();
 }
 public void NewtonSoftJsonReader_is_registered()
 {
     services.DefaultServiceFor <IJsonReader>()
     .Type.ShouldEqual(typeof(NewtonSoftJsonReader));
 }
 public void javascript_compressor_is_registered()
 {
     theServices.DefaultServiceFor <IJavaScriptCompressor>()
     .Type.ShouldEqual(typeof(JavaScriptCompressor));
 }
Example #11
0
 private void registeredTypeIs(Type service, Type implementation)
 {
     services.DefaultServiceFor(service)
     .Type.ShouldEqual(implementation);
 }
Example #12
0
 public void value_source_is_registered()
 {
     theServices.DefaultServiceFor(typeof(IValueSource <>)).Type.ShouldEqual(typeof(ValueSource <>));
 }
 public void less_engine()
 {
     _services.DefaultServiceFor <ILessEngine>()
     .ShouldNotBeNull()
     .Type.ShouldEqual(typeof(DefaultEngine));
 }