public void TestBaseRepositoryTraceForAfterAverageAll() { // Prepare var trace = new Mock <ITrace>(); var repository = new TraceEntityRepository(trace.Object); // Act repository.AverageAll(e => e.Id); // Assert trace.Verify(t => t.AfterAverageAll(It.IsAny <TraceLog>()), Times.Once); }