コード例 #1
0
 public void Do_NOT_Log_exception_100_if_StructureMap_config_is_missing_but_not_required()
 {
     assertNoErrorIsLogged(100, delegate
     {
         DataMother.RemoveStructureMapConfig();
         builder.UseAndEnforceExistenceOfDefaultFile = false;
     });
 }
コード例 #2
0
 public void Log_exception_100_if_StructureMap_config_is_required_and_missing()
 {
     assertErrorIsLogged(100, delegate
     {
         DataMother.RemoveStructureMapConfig();
         builder.UseAndEnforceExistenceOfDefaultFile = true;
     });
 }
コード例 #3
0
        public void DoNotUseDefaultAndUseADifferentFile()
        {
            DataMother.RemoveStructureMapConfig();

            builder.UseAndEnforceExistenceOfDefaultFile = false;
            builder.IgnoreDefaultFile = true;

            DataMother.WriteDocument("GenericsTesting.xml");

            builder.IncludeFile("GenericsTesting.xml");
            assertParserIdList("Generics");
        }
コード例 #4
0
        public void GetIncludes()
        {
            DataMother.RemoveStructureMapConfig();

            DataMother.WriteDocument("Include1.xml");
            DataMother.WriteDocument("Include2.xml");
            DataMother.WriteDocument("Master.xml");

            builder.UseAndEnforceExistenceOfDefaultFile = false;
            builder.IgnoreDefaultFile = true;
            builder.IncludeFile("Master.xml");

            assertParserIdList("Include1", "Include2", "Master");
        }
コード例 #5
0
        public void StructureMap_functions_without_StructureMapconfig_file_in_the_default_mode()
        {
            DataMother.RemoveStructureMapConfig();

            ObjectFactory.Initialize(x => { });
        }