1 Reply Latest reply: Oct 19, 2010 12:25 AM by Mark Proctor RSS

    Guvnor, In the [test scenario] it’s impossible to test the value of  an enumeration. ?

    jerome laffitte Newbie

      Guvnor, In the [test scenario] it’s impossible to test the value of  an enumeration. ?

       

       

      Détail :

      When I run the test scenario I have the message

           [QuoteFieldDescriptor] field [widget] was [date_input_widget] expected [0].

       

      In the [Test Scenarios] (the enumeration is ok with all value in the comboBox)

           GIVEN

                .....

           EXPECT

                A fact of type [FieldDescriptor] has values >

                 Widget  [equals[v]]   [TEXT_INPUT_WIDGET [v]]

       

      In my “upload POJO Model jar” :

      package org.arkham.model;

      public class QuoteFieldDescriptor {

            public static enum Widget{

                  TEXT_INPUT_WIDGET,

                  DATE_INPUT_WIDGET,

                  INTEGER_INPUT_WIDGET

            };

            */

            public static enum Widget{

                  TEXT_INPUT_WIDGET("text_input_widget"),

                  DATE_INPUT_WIDGET("date_input_widget"),

                  INTEGER_INPUT_WIDGET("integer_input_widget");

                  private String value;

                  private Widget(String value) {

                        this.value = value;

                  }

                  @Override

                  public String toString() {

                        return (value);

                  }

            };

            /*

            protected Widget widget;

            public Widget getWidget() {

                  return widget;

            }

            public void setWidget(Widget widget) {

                  this.widget = widget;

            }


      ……

      }


      In my configurationtype of my pakage

         Configuration: Imported types   “ import org.arkham.model.QuoteFieldDescriptor$Widget”

       

       

      A newbie problem or a guvnor Test Scenarios problem ?