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

            // Act
            repository.Update(
                new TraceEntity {
                Id = 1, Name = "Name"
            },
                whereOrPrimaryKey: 1);

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