Inheritance Hierarchy
DeltaEngine.Logging.Tests TextFileLoggerTests
Namespace: DeltaEngine.Logging.Tests
Assembly: DeltaEngine.Logging.Tests (in DeltaEngine.Logging.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The TextFileLoggerTests type exposes the following members.
Constructors
Name | Description | |
---|---|---|
TextFileLoggerTests | Initializes a new instance of the TextFileLoggerTests class |
Methods
Name | Description | |
---|---|---|
CreateProvider | ||
DisposeProvider | ||
LogErrorAndOpenFile | ||
LogInfoAndOpenFile | ||
LogTwoMessagesAndOpenFile | ||
LogWarningAndOpenFile | ||
WhenThereWasNoLoggingNoFileIsCreated |
Examples
[Test] public void WhenThereWasNoLoggingNoFileIsCreated() { Assert.IsFalse(File.Exists(LogFilePath)); }
[Test] public void LogInfoAndOpenFile() { logger.Write(Logger.MessageType.Info, "Test for logging info"); }
[Test] public void LogTwoMessagesAndOpenFile() { logger.Write(Logger.MessageType.Info, "Info message 1"); logger.Write(Logger.MessageType.Info, "Info message 2"); }
[Test] public void LogWarningAndOpenFile() { logger.Write(Logger.MessageType.Warning, "Something strange happened"); }
[Test] public void LogErrorAndOpenFile() { logger.Write(Logger.MessageType.Error, new InsufficientMemoryException().ToString()); }
See Also