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