Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert snake case in parameter names #147

Closed
nikowitt opened this issue Oct 16, 2015 · 1 comment
Closed

Convert snake case in parameter names #147

nikowitt opened this issue Oct 16, 2015 · 1 comment

Comments

@nikowitt
Copy link
Contributor

Hi Jan,

    @Test
    @UseDataProvider
    public void test_params_mapping(StringValuePair param_and_value, String expectedField) throws Exception {
        given().duns_lookup_service_with_user_$_password_$("user", "password");
        when().service_params_are_set(param_and_value);
        then().service_submission_params_contain(expectedField);
    }

I think it makes sense that snake cased params are also converted (_ replaced by blank), so the report looks like

 Scenario: test params mapping

   Given duns lookup service with user "user" password "password"
    When service params are set <param and value>
    Then service submission params contain <expectedField>

  Cases:

    | # | param and value      | expectedField   | Status  |
    +---+----------------------+-----------------+---------+
    | 1 | name/siemens         | Name            | Success |
    | 2 | country_isoAlpha2/DE | Country_Code    | Success |
    | 3 | city/Mannheim        | Town            | Success |
    | 4 | zipCode/12345        | Post_Code       | Success |
    | 5 | dunsNumber/12345     | DnB_DUNS_Number | Success |

instead of

 Scenario: test params mapping

   Given duns lookup service with user "user" password "password"
    When service params are set <param_and_value>
    Then service submission params contain <expectedField>

  Cases:

    | # | param_and_value      | expectedField   | Status  |
    +---+----------------------+-----------------+---------+
    | 1 | name/siemens         | Name            | Success |
    | 2 | country_isoAlpha2/DE | Country_Code    | Success |
    | 3 | city/Mannheim        | Town            | Success |
    | 4 | zipCode/12345        | Post_Code       | Success |
    | 5 | dunsNumber/12345     | DnB_DUNS_Number | Success |

What do you think?

@janschaefer
Copy link
Contributor

Makes totally sense.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants