JBehave
  1. JBehave
  2. JBEHAVE-1031

@AsParameters tables are not formatted

    Details

    • Type: Bug Bug
    • Status: Open Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 3.9
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Custom type parameter List is not formatted as html table, only as plain string (e.g.: |cell1|cell2|).

      For example:
      @AsParameters
      class SampleParameterClass

      { .. }

      @Given
      public void sampleGiven(List<SampleParameterClass> params) { .. }

      Would result a non formatted table.

      I think the problem is in the StepCreator#isTable method, because the input Type is a List, but List.class.isAssignatleFrom(ExamplesTable.class) is not true, but it is a table!

      Workaround is to replace List<SampleParameterClass> to ExamplesTable parameter in your method and call the getRowAs(SampleParameterClass.class) on the ExamplesTable.

        Activity

        Bence Olah made changes -
        Field Original Value New Value
        Description Custom type parameter List are not formatted as html tables, only as plain string (e.g.: |cell1|cell2).

        For example:
        @AsParameters
        class SampleParameterClass {
        ..
        }

        @Given
        public void sampleGiven(List<SampleParameterClass> params) {
        ..
        }

        Would result a non formatted table.

        I think the problem is in the StepCreator#isTable method, because the input Type is a List, but List.class.isAssignatleFrom(ExamplesTable.class) is not true, but it is a table!

        Workaround is to use replace List<SampleParameterClass> to ExamplesTable parameter in your method and call the getRowAs(SampleParameterClass.class) on the ExamplesTable.
        Custom type parameter List is not formatted as html table, only as plain string (e.g.: |cell1|cell2).

        For example:
        @AsParameters
        class SampleParameterClass {
        ..
        }

        @Given
        public void sampleGiven(List<SampleParameterClass> params) {
        ..
        }

        Would result a non formatted table.

        I think the problem is in the StepCreator#isTable method, because the input Type is a List, but List.class.isAssignatleFrom(ExamplesTable.class) is not true, but it is a table!

        Workaround is to use replace List<SampleParameterClass> to ExamplesTable parameter in your method and call the getRowAs(SampleParameterClass.class) on the ExamplesTable.
        Bence Olah made changes -
        Description Custom type parameter List is not formatted as html table, only as plain string (e.g.: |cell1|cell2).

        For example:
        @AsParameters
        class SampleParameterClass {
        ..
        }

        @Given
        public void sampleGiven(List<SampleParameterClass> params) {
        ..
        }

        Would result a non formatted table.

        I think the problem is in the StepCreator#isTable method, because the input Type is a List, but List.class.isAssignatleFrom(ExamplesTable.class) is not true, but it is a table!

        Workaround is to use replace List<SampleParameterClass> to ExamplesTable parameter in your method and call the getRowAs(SampleParameterClass.class) on the ExamplesTable.
        Custom type parameter List is not formatted as html table, only as plain string (e.g.: |cell1|cell2|).

        For example:
        @AsParameters
        class SampleParameterClass {
        ..
        }

        @Given
        public void sampleGiven(List<SampleParameterClass> params) {
        ..
        }

        Would result a non formatted table.

        I think the problem is in the StepCreator#isTable method, because the input Type is a List, but List.class.isAssignatleFrom(ExamplesTable.class) is not true, but it is a table!

        Workaround is to use replace List<SampleParameterClass> to ExamplesTable parameter in your method and call the getRowAs(SampleParameterClass.class) on the ExamplesTable.
        Bence Olah made changes -
        Description Custom type parameter List is not formatted as html table, only as plain string (e.g.: |cell1|cell2|).

        For example:
        @AsParameters
        class SampleParameterClass {
        ..
        }

        @Given
        public void sampleGiven(List<SampleParameterClass> params) {
        ..
        }

        Would result a non formatted table.

        I think the problem is in the StepCreator#isTable method, because the input Type is a List, but List.class.isAssignatleFrom(ExamplesTable.class) is not true, but it is a table!

        Workaround is to use replace List<SampleParameterClass> to ExamplesTable parameter in your method and call the getRowAs(SampleParameterClass.class) on the ExamplesTable.
        Custom type parameter List is not formatted as html table, only as plain string (e.g.: |cell1|cell2|).

        For example:
        @AsParameters
        class SampleParameterClass {
        ..
        }

        @Given
        public void sampleGiven(List<SampleParameterClass> params) {
        ..
        }

        Would result a non formatted table.

        I think the problem is in the StepCreator#isTable method, because the input Type is a List, but List.class.isAssignatleFrom(ExamplesTable.class) is not true, but it is a table!

        Workaround is to replace List<SampleParameterClass> to ExamplesTable parameter in your method and call the getRowAs(SampleParameterClass.class) on the ExamplesTable.

          People

          • Assignee:
            Unassigned
            Reporter:
            Bence Olah
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: