Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EmrysMyrddin/69b8ca0df9a322a682e0a768ff1fdcd8 to your computer and use it in GitHub Desktop.
Save EmrysMyrddin/69b8ca0df9a322a682e0a768ff1fdcd8 to your computer and use it in GitHub Desktop.
for(TestStep step : listOfTestStep)
{
WsdlTestStep stepWithConfig;
SamplerTestStep stepWithRequest;
if(setp instanceOf WsdlTestStep) stepWithConfig = (WsdlTestStep) step
if(setp instanceOf SampleTestStep) stepWithRequest = (SampleTestStep) step
//Tu fait des trucs ma bite
if(stepWithConfig) {
//Tu fait des trucs mon zboub mais que si c'est du WsdlTestStep
//Un peu con parce que tu implemente cette interface dans tous les cas :-)
}
if(stepWithRequest) {
//Tu fait des trucs mon zgeg mais que si c'est tu est avec un .getRequest
//Du coup ici tu peux utiliser stepWithConfig.getConfig() et
// stepWithRequest.getRequest() :-)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment