public void WritingAnErrorMessageToTheDatabaseShouldStoreAnErrorMessage()
 {
     using (var source = new TestLoggingSource())
     {
         var before = source.ErrorLogQuery().Count();
         var loggingService = new LoggingService(source);
         loggingService.Log("Test", LogLevel.Error);
         var after = source.ErrorLogQuery().Count();
         Assert.IsTrue(after == before + 1);
     }
 }
 public void WritingAnAuditMessageToTheDatabaseShouldStoreAnAuditMessage()
 {
     using (var source = new TestLoggingSource())
     {
         var before = source.AuditLogQuery().Count();
         var loggingService = new LoggingService(source);
         loggingService.LogToAudit("Test", "AuditTest");
         var after = source.AuditLogQuery().Count();
         Assert.IsTrue(after == before + 1);
     }
 }