Example #1
0
        public void UpdateMail_WithValidDataAndId_ShouldReturnOkObjectResult()
        {
            // Act
            var result = sut.UpdateMail(mail, existingMailingId);

            // Assert
            Assert.IsInstanceOfType(result, typeof(OkObjectResult));
            mockMailingRepository.Verify(m => m.Retrieve(existingMailingId), Times.Once);
            mockMailingService.Verify(m => m.Save(existingMailingId, mail), Times.Once);
        }