Reputation: 42050
Suppose I am checking POJO properties in my unit tests as
assertNotNull(pojo1.getX().getY().getZ());
assertEquals(pojo2.getA().getB().getStr(), "foo")
assertEquals(pojo2.getC().getD().getNum(), 100)
Now I have to read the properties and their values from a text file, which contains:
pojo1.x.y.z pojo2.a.b.str = foo pojo2.c.d.num = 100
What is the best way to convert those text expression into the java code above?
Upvotes: 0
Views: 92