TextFileLoggerTests ClassDelta Engine Documentation
Inheritance Hierarchy

System Object
  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

public class TextFileLoggerTests

The TextFileLoggerTests type exposes the following members.

Constructors

  NameDescription
Public methodTextFileLoggerTests
Initializes a new instance of the TextFileLoggerTests class
Top
Methods

  NameDescription
Public methodCreateProvider
Public methodDisposeProvider
Public methodLogErrorAndOpenFile
Public methodLogInfoAndOpenFile
Public methodLogTwoMessagesAndOpenFile
Public methodLogWarningAndOpenFile
Public methodWhenThereWasNoLoggingNoFileIsCreated
Top
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