Exemple #1
0
        public void TestBaseRepositoryTraceForAfterInsertAllAsync()
        {
            // Prepare
            var trace      = new Mock <ITrace>();
            var repository = new TraceEntityRepository(trace.Object);

            // Act
            repository.InsertAllAsync(new[] { new TraceEntity {
                                                  Name = "Name"
                                              } }).Wait();

            // Assert
            trace.Verify(t => t.AfterInsertAll(It.IsAny <TraceLog>()), Times.Exactly(1));
        }