public async Task GenerateVerificationCode_ShouldReturn_SuccessMessage_If_Phone_And_CountryCode_Are_Valid()
        {
            // Arrange
            var verifyServiceMock = new Mock <IPhoneVerificationService>();
            var param             = new GeneratePhoneVerificationDTO()
            {
                PhoneNumber = TEST_NUMBER,
                CountryCode = TEST_COUNTRY_CODE,
            };

            verifyServiceMock.Setup(vs => vs.GenerateVerificationCodeAsync(param.CountryCode, param.PhoneNumber)).ReturnsAsync(Result.Ok(true));

            // Act
            var controller   = new PhoneVerificationController(verifyServiceMock.Object);
            var actualResult = await controller.GenerateVerificationCode(param);

            // Assert
            verifyServiceMock.Verify(vs => vs.GenerateVerificationCodeAsync(param.CountryCode, param.PhoneNumber), Times.Once);
            Assert.IsAssignableFrom <OkObjectResult>(actualResult);
            var contentResult = actualResult as OkObjectResult;

            Assert.AreEqual(Status200, contentResult.StatusCode.Value);
            Assert.IsAssignableFrom <string>(contentResult.Value);
            var actualValue = contentResult.Value as string;

            Assert.AreEqual(Constants.PhoneVerifyMessages.Verification_Code_Sent, actualValue);
        }
        public async Task GenerateVerificationCode_ShouldReturn_ErrorMessage_If_Phone_Or_Country_Is_Invalid(GeneratePhoneVerificationDTO param)
        {
            // Arrange
            var verifyServiceMock = new Mock <IPhoneVerificationService>();

            verifyServiceMock.Setup(vs => vs.GenerateVerificationCodeAsync(param.CountryCode, param.PhoneNumber)).ReturnsAsync(Result.Fail <bool>(Constants.PhoneVerifyMessages.Country_Phone_Invalid));

            // Act
            var controller   = new PhoneVerificationController(verifyServiceMock.Object);
            var actualResult = await controller.GenerateVerificationCode(param);

            // Assert
            Assert.IsAssignableFrom <BadRequestObjectResult>(actualResult);
            var contentResult = actualResult as BadRequestObjectResult;

            Assert.AreEqual(Status400, contentResult.StatusCode.Value);
            Assert.IsAssignableFrom <string>(contentResult.Value);
            var actualValue = contentResult.Value as string;
        }