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

            // Act
            repository.InsertAsync(new TraceEntity {
                Name = "Name"
            }).Wait();

            // Assert
            trace.Verify(t => t.AfterInsert(It.IsAny <TraceLog>()), Times.Once);
        }