public void WriteAMessageIfWriteIsCalled() { var stream = new System.IO.MemoryStream(); var target = new Provider(stream); target.Write(string.Empty.GetRandom(), string.Empty.GetRandom(), string.Empty.GetRandom(), 10.GetRandom(), (Entities.EventLogEntryType) 3.GetRandom()); stream.Verify(h => !string.IsNullOrEmpty(h), "Not null or empty"); }
public void LogInformationIfLogInformationIsCalled() { string expected = "/5"; var stream = new System.IO.MemoryStream(); var target = new Provider(stream); target.LogInformation(string.Empty.GetRandom(), string.Empty.GetRandom(), string.Empty.GetRandom()); stream.Verify(h => h.Contains(expected), $"Contain '{expected}'"); }
public void WriteTheCorrectMessage() { string expected = string.Empty.GetRandom(); var stream = new System.IO.MemoryStream(); var target = new Provider(stream); target.Write(string.Empty.GetRandom(), string.Empty.GetRandom(), expected, 10.GetRandom(), (Entities.EventLogEntryType) 3.GetRandom()); stream.Verify(h => h.Contains(expected), $"Contain '{expected}'"); }