AddCountryCode_Of_IranMobilePhone_Should_ThrowException_WhenNumberIsWrong(string entry) { //Arrange IranMobilePhone phoneService = new IranMobilePhone(); //Act Action validate = () => phoneService.AddCountryCode(entry); //Assert validate.Should().Throw <PhoneNumberInvalidException>(); }
AddCountryCode_Of_IranMobilePhone_ShouldreturnTrue_WhenItIsCorrectAndHasPlus(string entry, string result) { //Arrange IranMobilePhone phone = new IranMobilePhone(); //Act var answer = phone.AddCountryCode(entry); //Assert answer.Should().Be(result); }