public void EventLogger_WriteToLog_ReturnsCorrectFile() { var uut = new EventLogger(); uut.Clear(); var expected = "Hello World"; uut.WriteLine(expected); var msg = new char[11]; using (var streamReader = new StreamReader($"{Environment.GetFolderPath(Environment.SpecialFolder.Desktop)}\\Events.txt")) streamReader.Read(msg, 0, 11); Assert.That(msg, Is.EqualTo(expected)); uut.Clear(); }
public override void Clear() { eventsLogger.Clear(); }