vendredi 8 juin 2018

Dropwizard Testing with environment variables

I would like to use environment variables when testing my Dropwizard implementation. Right now I use for testing the DropwizardClientRule class.

@ClassRule
public static final DropwizardClientRule dropwizard = new DropwizardClientRule(new PingResource()); 

Is there any way on how to set environment variables within the particular resource (i.e. PingResource) when performing testing?

Moreover I would like to use EnvironmentVariableSubstitutor but that requires me to trigger somehow my initialize method. Does anyone of you know if this is possible with the the DropwizardClientRule class.

Best regards

Andy

Aucun commentaire:

Enregistrer un commentaire