I am very new to QF-Test and Jython and Groovy scripting language, and I have a java class containing an Enum as follows:
public class CashDrawer {
private static enum Denomination {
den02, den05, den5,den10;
double getDenomValue(){
switch(this) {
case den05:
return 0.5d;
case den5:
return 5.0d;
case den10:
return 10.0d;
default:
return 0.2d;
}
}
//return the row number of the denomination in cash drawer table
int getDenomRowNum() {
switch(this) {
case den10:
return 1;
case den5:
return 2;
case den05:
return 3;
default:
return 4;
}
}
Denomination getNextDenom() {
switch(this) {
case den02:
return den05;
case den05:
return den5;
case den5:
return den10;
default:
return null;
}
}
}
private Denomination currentDenom;
.
.
.
}
And I also had a look at the class CheckDataType at section 41.4.4 in the manual, still haven’t got a clue on the implementation. Please give me some example on how to write the above Enum in Jython or Groovy SUT script.
We use "Matomo" cookies to anonymously evaluate your visit to our website. For this we need your consent, which is valid for twelve months. A revocation, so-called opt-out, is possible at any time on our privacy page.