Exemple #1
0
        public void GetReturnsEmailWhenUserExists()
        {
            // Arrange
            _mockUsersFinderService.Setup(m => m.FindUserEmailById(It.Is <int>(x => x == 1))).Returns(new Maybe <Email>(new Email("*****@*****.**")));

            // Act
            var result = _controller.GetEmail(1);

            // Assert
            var email = AssertHelpers.IsOkResult <Email>(result);

            Assert.AreEqual(new Email("*****@*****.**"), email);
        }