SimpleLog/SimpleLog.Tests/LoggerManagerTest.cs

25 lines
655 B
C#

using NUnit.Framework;
using NUnit.Framework.SyntaxHelpers;
using SimpleLog.Framework;
namespace SimpleLog.Tests {
[TestFixture]
public class LoggerManagerTest {
[Test]
public void TestGetLogger() {
DefaultLogger logger = LoggerManager.GetLogger<DefaultLogger>();
Assert.That(logger, Is.TypeOf(typeof(DefaultLogger)));
DefaultLogger logger2 = LoggerManager.GetLogger<DefaultLogger>();
Assert.That(logger2, Is.TypeOf(typeof(DefaultLogger)));
}
[Test]
[ExpectedException("System.ArgumentException")]
public void TestGetLoggerThrowsArgumentException() {
LoggerManager.GetLogger<object>();
}
}
}