JBehave
  1. JBehave
  2. JBEHAVE-838

can I pass multiple table with multiple parameter in Given

    Details

    • Type: Wish Wish
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Not A Bug
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Core Examples
    • Labels:
      None
    • Number of attachments :
      0

      Description

      I am new in Jbehave, I am looking to pass multiple table with multiple parameter in Given. I saw documentation only for one table with multiple data.

        Activity

        Hide
        Mauro Talevi added a comment -

        Yes it is possible with syntax that is a straightforward extension:

        @Given("a table $first and another table $second")
        public void twoTables(ExamplesTable first, ExamplesTable second){
        // blah
        }
        
        Given a table 
        |header|
        ...
        |row|
        and another table 
        |header|
        ...
        |row|
        

        Please use the mailing lists (http://jbehave.org/mailing-lists.html) as first point of contact when asking questions.

        Then raise issue once you've determined feature is not there.

        Show
        Mauro Talevi added a comment - Yes it is possible with syntax that is a straightforward extension: @Given( "a table $first and another table $second" ) public void twoTables(ExamplesTable first, ExamplesTable second){ // blah } Given a table |header| ... |row| and another table |header| ... |row| Please use the mailing lists ( http://jbehave.org/mailing-lists.html ) as first point of contact when asking questions. Then raise issue once you've determined feature is not there.
        Hide
        Goops Shre added a comment -

        Thanks Mauro,
        can I fill balance data (header2 and header3)from java in Given "a table" and "another table"? i.e.
        Given a members

        memberID header2 header3
        11223
           

        and claims
        claimsID | typesofClaims| ClaimsNumbers| |
        C1001| | | |

        my steps are as follows:
        @Given("$members with $claims")
        public void AddValues(ExamplesTable members, ExamplesTable claims)

        { //TODO loop through members to: // 1. Insert header2 from partyType(Table)...note:Few fields only // 2. Insert header3 from contactType(Table)(Note: all fields) //TODO loop through claims to: // 1. Insert claimID from Claim(Table) // 2. Insert typesofClaims from MedicalClaim(Table) }
        Show
        Goops Shre added a comment - Thanks Mauro, can I fill balance data (header2 and header3)from java in Given "a table" and "another table"? i.e. Given a members memberID header2 header3 11223     and claims claimsID | typesofClaims| ClaimsNumbers| | C1001| | | | my steps are as follows: @Given("$members with $claims") public void AddValues(ExamplesTable members, ExamplesTable claims) { //TODO loop through members to: // 1. Insert header2 from partyType(Table)...note:Few fields only // 2. Insert header3 from contactType(Table)(Note: all fields) //TODO loop through claims to: // 1. Insert claimID from Claim(Table) // 2. Insert typesofClaims from MedicalClaim(Table) }
        Hide
        Mauro Talevi added a comment -

        Please use the mailing lists for discussions. I'm closing this issue.

        Show
        Mauro Talevi added a comment - Please use the mailing lists for discussions. I'm closing this issue.
        Mauro Talevi made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Not A Bug [ 6 ]
        Goops Shre made changes -
        Resolution Not A Bug [ 6 ]
        Status Resolved [ 5 ] Reopened [ 4 ]
        Hide
        Mauro Talevi added a comment -

        You've changed the standard StoryReporterBuilde.codeLocation(), from target/classes to something else.

        If you use the defaults, the reports will be displayed in target/jbehave/view.

        Please DO NOT reopen this issue. Use the mailing lists to discuss issues.

        Show
        Mauro Talevi added a comment - You've changed the standard StoryReporterBuilde.codeLocation(), from target/classes to something else. If you use the defaults, the reports will be displayed in target/jbehave/view. Please DO NOT reopen this issue. Use the mailing lists to discuss issues.
        Mauro Talevi made changes -
        Status Reopened [ 4 ] Resolved [ 5 ]
        Resolution Not A Bug [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Goops Shre
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: