示例#1
0
 public void RunTimeLevel_Cant_Be_None()
 {
     try
     {
         // Before bug fix 4.20.1 this would through exception due to Log.LogError doing validation on ApplicationSetup,
         // which had no chance of setting the ApplicationSetup properties because the logging intervened
         FulcrumApplicationHelper.RuntimeSetup("app-name", new Tenant("o", "e"), RunTimeLevelEnum.None);
         UT.Assert.Fail("Expected exception");
     }
     catch (Exception e)
     {
         UT.Assert.IsTrue(e.Message.Contains(nameof(RunTimeLevelEnum.None)),
                          $"Expected error message to contain {nameof(RunTimeLevelEnum.None)}, but it didn't. Was {e.Message}");
     }
 }