JBehave
  1. JBehave
  2. JBEHAVE-443

Update ExamplesTableConverter documentation for i18n cconfiguration

    Details

    • Type: Task Task
    • Status: Resolved Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.2
    • Fix Version/s: 3.3
    • Component/s: Documentation
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Hi,

      based on the i18n example I tried to configure an abstract class but get a build error.
      Seems the constructor ExamplesTableConverter(java.lang.String,java.lang.String), even though in the javadoc,
      is missing. I tried with stable release (3.1.2) and 3.2-SNAPSHOT.

      And for the wishlist: Could you enrich the examples with their import statemens so they could be just copied and pasted? Thx.
      --snip--
      ...
      [ERROR] COMPILATION ERROR :
      [INFO] -------------------------------------------------------------
      [ERROR] /home/flo/workspace/myproject-root/myproject-activiti-delegates/src/test/java/com/mycustomer/myproject/activiti/delegates/bdd/story/GermanStories.java:[56,68] cannot find symbol
      symbol : constructor ExamplesTableConverter(java.lang.String,java.lang.String)
      location: class org.jbehave.core.steps.ParameterConverters.ExamplesTableConverter

      [INFO] 1error
      [INFO] -------------------------------------------------------------
      [INFO] ------------------------------------------------------------------------
      [INFO] BUILD FAILURE
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 24.939s
      [INFO] Finished at: Mon Feb 28 13:01:36 CET 2011
      [INFO] Final Memory: 49M/244M
      [INFO] ------------------------------------------------------------------------
      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.1:testCompile (default-testCompile) on project myproject-activiti-delegates: Compilation failure
      [ERROR] /home/flo/workspace/myproject-root/myproject-activiti-delegates/src/test/java/com/mycustomer/myproject/activiti/delegates/bdd/story/GermanStories.java:[56,68] cannot find symbol
      [ERROR] symbol : constructor ExamplesTableConverter(java.lang.String,java.lang.String)
      [ERROR] location: class org.jbehave.core.steps.ParameterConverters.ExamplesTableConverter
      [ERROR] -> [Help 1]
      --snap--

        Activity

        Hide
        Mauro Talevi added a comment -

        What are you trying to do? If you explain your usecase we can help you in a more knowledgeable way.
        BTW, The converter now depends on ExamplesTableFactory. Please try with latest stable release, which is now 3.2.

        Show
        Mauro Talevi added a comment - What are you trying to do? If you explain your usecase we can help you in a more knowledgeable way. BTW, The converter now depends on ExamplesTableFactory. Please try with latest stable release, which is now 3.2.
        Hide
        Florian Beckmann added a comment -

        My use-case is simply the one given here:
        http://jbehave.org/reference/latest/stories-in-your-language.html

        But the given example (public abstract class LocalizedTraderStories) fails to compile because of the line(s):

        new ParameterConverters()
        .addConverters(new ParameterConverters.ExamplesTableConverter(
        keywords.examplesTableHeaderSeparator(),
        keywords.examplesTableValueSeparator())));

        Trying to build I get the error mentioned in my first comment.

        So,
        Given you provide an example in your doc for version latest for your users
        When the average user tries to run that example
        Then it should work with the current latest api

        Anyway, I just commented the lines out, because I don't need to set neither the TableHeader- nor the TableValue-Seperator from my keywords properties file. So my stories run in german now.

        And thx for the fast reply anyway.

        Show
        Florian Beckmann added a comment - My use-case is simply the one given here: http://jbehave.org/reference/latest/stories-in-your-language.html But the given example (public abstract class LocalizedTraderStories) fails to compile because of the line(s): — new ParameterConverters() .addConverters(new ParameterConverters.ExamplesTableConverter( keywords.examplesTableHeaderSeparator(), keywords.examplesTableValueSeparator()))); — Trying to build I get the error mentioned in my first comment. So, Given you provide an example in your doc for version latest for your users When the average user tries to run that example Then it should work with the current latest api Anyway, I just commented the lines out, because I don't need to set neither the TableHeader- nor the TableValue-Seperator from my keywords properties file. So my stories run in german now. And thx for the fast reply anyway.
        Hide
        Mauro Talevi added a comment -

        You're right, documentation is out of date. As of 3.2, you need to use:

        new ExamplesTableConverter(new ExamplesTableFactory(new LocalizedKeywords(Locale)))
        

        We'll update the docs.

        Show
        Mauro Talevi added a comment - You're right, documentation is out of date. As of 3.2, you need to use: new ExamplesTableConverter( new ExamplesTableFactory( new LocalizedKeywords(Locale))) We'll update the docs.
        Mauro Talevi made changes -
        Field Original Value New Value
        Summary Missing constructor ExamplesTableConverter(java.lang.String,java.lang.String) Update ExamplesTableConverter documentation for i18n cconfiguration
        Issue Type Bug [ 1 ] Task [ 3 ]
        Fix Version/s 3.3 [ 17108 ]
        Affects Version/s 3.2 [ 16757 ]
        Priority Major [ 3 ] Minor [ 4 ]
        Component/s Documentation [ 11085 ]
        Mauro Talevi made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Florian Beckmann
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: