Example #1
0
 public void WriteDeprecationWarnings()
 {
     VerifyLog(TraceUtilities.DEPRECATION_MESSAGES_SOURCE, delegate()
     {
         // Ensure deprecation warnings are logged at the warning level.
         TraceUtilities.WriteDeprecationWarnings(TEST_LOG_MESSAGE);
     }, WARNING_MARKER);
 }
Example #2
0
        public void WriteDeprecationWarnings()
        {
            using (var stream = new MemoryStream()) {
                enableLoggingToMemoryStream(TraceUtilities.DEPRECATION_MESSAGES_SOURCE, stream);

                // Ensure deprecation warnings are logged at the warning level.
                TraceUtilities.WriteDeprecationWarnings(TEST_LOG_MESSAGE);
                StringAssert.Contains(WARNING_MARKER, getLogFromMemoryStream(stream));
            }
        }