Beispiel #1
0
        public void DeleteContributionMonetaryReviewerById_Success_Test()
        {
            // Arrange
            int id = 1;

            // create mock for repository
            var mock = new Mock <IContributionMonetaryReviewerRepository>();

            mock.Setup(s => s.DeleteContributionMonetaryReviewer(Moq.It.IsAny <int>())).Verifiable();

            // service
            ContributionMonetaryReviewerService contributionMonetaryReviewerService = new ContributionMonetaryReviewerService();

            ContributionMonetaryReviewerService.Repository = mock.Object;

            // Act
            contributionMonetaryReviewerService.DeleteContributionMonetaryReviewer(id);

            // Assert
            Assert.IsTrue(true);
        }
Beispiel #2
0
        public void DeleteContributionMonetaryReviewer_Success_Test()
        {
            // Arrange
            ContributionMonetaryReviewerDTO dto = SampleContributionMonetaryReviewerDTO(1);

            dto.IsDeleted = false;

            // create mock for repository
            var mock = new Mock <IContributionMonetaryReviewerRepository>();

            mock.Setup(s => s.DeleteContributionMonetaryReviewer(Moq.It.IsAny <R_ContributionMonetaryReviewer>())).Verifiable();

            // service
            ContributionMonetaryReviewerService contributionMonetaryReviewerService = new ContributionMonetaryReviewerService();

            ContributionMonetaryReviewerService.Repository = mock.Object;

            // Act
            contributionMonetaryReviewerService.DeleteContributionMonetaryReviewer(dto);

            // Assert
            Assert.IsTrue(true);
        }