+
Skip to content

implicit conversion from String to Enum #293

Open
@vgheo

Description

@vgheo

Concordion variables set in the specification take String type by default.

It should be possible to directly pass these variables as arguments to fixture methods taking Enum parameters.

Currently this results in an exception - eg

java.lang.IllegalArgumentException: Unable to convert type java.lang.String of RED to type of org.example.Color

Sample project: https://github.com/vgheo/concordion-samples/tree/master/concordion-iss-cast-enum

Failing test :

Should be able to use RED to do stuff
Unable to convert type java.lang.String of RED to type of org.example.Color

.
Should be able to set var1 public field
Unable to convert type java.lang.String of RED to type of org.example.Color

Should be able to set var2 via setter
Unable to convert type java.lang.String of RED to type of org.example.Color

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载