G.L.
2016-10-14 14:16:13 UTC
Hi I'm trying to convert the data table in feature file into custom java
object, should I use @XStreamConverter, can anyone give an example to
create custom XStreamConvert class?
e.g.
//in feature file:
Given MyClassData with
| name | Date | dataTypeCode |
| myName | 2016-07-01 | code1 |
//in step.java file:
@Given("^MyClassData with$")
*public* *void* MyClassData _With(List<MyClass> MyClassDataInput) *throws*
Throwable {
dataList = MyClassDataInput;
}
Public MyClass{
String name;
Date date;
MyTypeCode typeCode;
}
public MyTypeCode{
public static code1= new MyTypeCode("code1");
public static code2 = new MyTypeCode("code2");
public static code3= new MyTypeCode("code3");
}
How to map dataTypeCode into MyTypeCode class when loading feature file?
Thanks for help!
object, should I use @XStreamConverter, can anyone give an example to
create custom XStreamConvert class?
e.g.
//in feature file:
Given MyClassData with
| name | Date | dataTypeCode |
| myName | 2016-07-01 | code1 |
//in step.java file:
@Given("^MyClassData with$")
*public* *void* MyClassData _With(List<MyClass> MyClassDataInput) *throws*
Throwable {
dataList = MyClassDataInput;
}
Public MyClass{
String name;
Date date;
MyTypeCode typeCode;
}
public MyTypeCode{
public static code1= new MyTypeCode("code1");
public static code2 = new MyTypeCode("code2");
public static code3= new MyTypeCode("code3");
}
How to map dataTypeCode into MyTypeCode class when loading feature file?
Thanks for help!
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.