コード例 #1
0
        public void Should_CallCommit()
        {
            // Arrange
            var addService = new AddsServices(this.repoMocked.Object, this.unitOfWorkMocked.Object);


            // Act
            addService.FindByIdAndDelete(id3);

            // Assert
            this.unitOfWorkMocked.Verify(x => x.Commit(), Times.Once);
        }
コード例 #2
0
        public void ShouldSet_IsDeleted()
        {
            // Arrange
            var addService = new AddsServices(this.repoMocked.Object, this.unitOfWorkMocked.Object);
            var foundAdd   = addService.FindById(id3);

            // Act
            addService.FindByIdAndDelete(id3);

            // Assert
            Assert.AreEqual(foundAdd.IsDeleted, true);
        }