svn merge http://svn.tommymontgomery.com/SimpleLog/trunk http://svn.tommymontgomery.com/SimpleLog/branches/1.1
37 lines
968 B
C#
37 lines
968 B
C#
using System;
|
|
using NUnit.Framework;
|
|
using NUnit.Framework.SyntaxHelpers;
|
|
using SimpleLog.LogHandlers;
|
|
|
|
namespace SimpleLog.Tests {
|
|
[TestFixture]
|
|
public class ConsoleLogHandlerTest {
|
|
|
|
private ConsoleLogHandler handler;
|
|
|
|
[SetUp]
|
|
public void Init() {
|
|
handler = new ConsoleLogHandler();
|
|
}
|
|
|
|
[Test]
|
|
public void TestLog() {
|
|
Assert.That(this.handler.Log("yay", Framework.LogLevel.Critical));
|
|
Assert.That(this.handler.Log("yay", Framework.LogLevel.Debug));
|
|
}
|
|
|
|
[Test]
|
|
public void TestGetOutputStream() {
|
|
Assert.That(this.handler.GetOutputStream(ConsoleLogHandler.STD_ERROR_HANDLE), Is.SameAs(Console.Error));
|
|
Assert.That(this.handler.GetOutputStream(ConsoleLogHandler.STD_OUTPUT_HANDLE), Is.SameAs(Console.Out));
|
|
}
|
|
|
|
[Test]
|
|
public void TestAccessors() {
|
|
Assert.That(handler.MessageHandler, Is.TypeOf(typeof(DefaultMessageHandler)));
|
|
Assert.That(handler.LogLevel, Is.EqualTo(null));
|
|
}
|
|
|
|
}
|
|
}
|