public void TestBaseRepositoryTraceForAfterQueryAsync() { // Prepare var trace = new Mock <ITrace>(); var repository = new TraceEntityRepository(trace.Object); // Act repository.QueryAsync(te => te.Id == 1).Wait(); // Assert trace.Verify(t => t.AfterQuery(It.IsAny <TraceLog>()), Times.Once); }