Skip to content

Commit

Permalink
Wording improvement
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert-SD committed Feb 21, 2025
1 parent 1b6b3f7 commit e6f69b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,15 @@ internal class CardValidationTest {
}

@Test
fun `given longer valid security code and Amex brand when validate then result should be valid`() {
fun `given 4 digit valid security code and Amex brand when validate then result should be valid`() {
val validationResult = CardValidation.validateCardSecurityCode("1234", "amex")

assertEquals(CardSecurityCodeValidationResultDTO.VALID, validationResult)
}

@Test
fun `given longer valid security code without card brand when validate then result should be invalid`() {
val validationResult = CardValidation.validateCardSecurityCode("1234",null)
fun `given 4 digit valid security code without card brand when validate then result should be invalid`() {
val validationResult = CardValidation.validateCardSecurityCode("1234", null)

// This outcome should be valid. The Android team will adjust the validation in a next version.
assertEquals(CardSecurityCodeValidationResultDTO.INVALID, validationResult)
Expand Down
4 changes: 2 additions & 2 deletions example/ios/RunnerTests/CardValidatorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -140,12 +140,12 @@ class CardValidatorTestss: XCTestCase {
XCTAssertEqual(validationResult, true)
}

func test_given_validSecurityCodeAndAmexBrand_when_validate_then_returnValid() {
func test_given_4digitValidSecurityCodeAndAmexBrand_when_validate_then_returnValid() {
let validationResult = CardValidation().validateCardSecurityCode(securityCode: "1234", cardBrand: "amex")
XCTAssertEqual(validationResult, true)
}

func test_given_validSecurityCodeAndNoBrand_when_validate_then_returnValid() {
func test_given_4digitValidSecurityCodeAndNoBrand_when_validate_then_returnValid() {
let validationResult = CardValidation().validateCardSecurityCode(securityCode: "1234", cardBrand: nil)
XCTAssertEqual(validationResult, true)
}
Expand Down

0 comments on commit e6f69b7

Please sign in to comment.