agreen53
13 years agoOccasional Contributor
Programmatically generating assertions.
Okay this is an issue I am have trouble figuring out on my own.
I am attempting to Programmatically add an assertion and the problem I am running into is that when I open the AddAssertionPanel for a RestTestRequestStep, Valid and Invalid HTTP Status Codes are disabled as a selectable option. Running the same library with the UI, these options are available. Could someone please help me to understand why this is happening?
My code is as Follows:
If anyone knows the answer it would be much appreciated if you could share.
I am attempting to Programmatically add an assertion and the problem I am running into is that when I open the AddAssertionPanel for a RestTestRequestStep, Valid and Invalid HTTP Status Codes are disabled as a selectable option. Running the same library with the UI, these options are available. Could someone please help me to understand why this is happening?
My code is as Follows:
public static Object addAssertionToTestStep(WsdlTestStep teststep) {
if (!(teststep instanceof Assertable))
return null;
else {
Assertable a = (Assertable) teststep;
Map<String, TestAssertionFactory> map = getAssertionFactories();
final AddAssertionPanel addAssertionPanel = new AddAssertionPanel( a );
addAssertionPanel.setVisible(true);
return null;
}
}
If anyone knows the answer it would be much appreciated if you could share.