java - Using theories in junit to create a list of all possible results? -
i've been using theories before try different entries how set values object in junit.
now facing issue,
i want same using theories , create different objects possible answers group them in list later pass other test (assertions).
i tried make empty list , add elements calling private method runs theory , uses entry points doesnt work... this:
@datapoints("ids") public static string[] eventids = {"123", "1234"}; @theory private object test(@fromdatapoints("ids") final string id) { return new object(id); } and then
@test private void finaltest() { list<object> objects = new arraylist<object>(); objects.add(test()); //<==== cannot } any idea how archive this?
at end want list possible objects (in case 2)
Comments
Post a Comment