public void TestSetLog() { var log = new TestLogObject(); Log.SetLog(log); Log.WriteInfoToLog("does this work?"); Assert.AreEqual("does this work?", log.SeeLogDetails().Trim()); }
public void TestWriteErrorToLog() { var testlog = new TestLogObject(); Log.SetLog(testlog); var exception = new Exception("This is going on the log"); Log.WriteErrorToLog("We had a problem", exception); var testString = testlog.SeeLogDetails(); Assert.IsTrue(testString.Contains("We had a problem")); Assert.IsTrue(testString.Contains(exception.Message)); }