コード例 #1
0
 public void PassesThroughWarn()
 {
     string message = "a message";
       MockLog log = new MockLog();
       ProxyLog tested = new ProxyLog(log);
       tested.Warn(message);
       Assert.IsTrue(log.Any(x => x.Level == MockLog.Level.Warn && x.Message == message));
 }
コード例 #2
0
 public void PassesThroughFormattedWarn()
 {
     string format = "message {0}";
       string arg = "arg";
       var formatProvider = CultureInfo.InvariantCulture;
       MockLog log = new MockLog();
       ProxyLog tested = new ProxyLog(log);
       tested.Warn(formatProvider, format, arg);
       Assert.IsTrue(log.Any(x => x.Level == MockLog.Level.Warn && x.Message == string.Format(formatProvider, format, arg)));
 }