use of org.testng.annotations.BeforeMethod in project failsafe by jhalterman.
the class AsyncFailsafeTest method beforeMethod.
@BeforeMethod
protected void beforeMethod() {
reset(service);
waiter = new Waiter();
counter = new AtomicInteger();
}
use of org.testng.annotations.BeforeMethod in project failsafe by jhalterman.
the class SyncFailsafeTest method beforeMethod.
@BeforeMethod
protected void beforeMethod() {
reset(service);
counter = new AtomicInteger();
}
use of org.testng.annotations.BeforeMethod in project failsafe by jhalterman.
the class Issue36 method beforeMethod.
@BeforeMethod
protected void beforeMethod() {
calls = new AtomicInteger();
failedAttempts = new AtomicInteger();
retries = new AtomicInteger();
}
use of org.testng.annotations.BeforeMethod in project che by eclipse.
the class JsonRpcResponseTest method setUp.
@BeforeMethod
public void setUp() throws Exception {
response = new JsonObject();
JsonObject error = new JsonObject();
JsonObject result = new JsonObject();
error.addProperty("code", 0);
error.addProperty("message", "error message");
response.addProperty("jsonrpc", "2.0");
response.addProperty("id", "0");
response.add("error", error);
response.add("result", result);
when(this.result.toJsonElement()).thenReturn(result);
when(this.error.toJsonObject()).thenReturn(error);
}
use of org.testng.annotations.BeforeMethod in project che by eclipse.
the class ZipUtilsTest method setUp.
@BeforeMethod
public void setUp() throws IOException {
zipFile = File.createTempFile("test", "zip");
zipFile.deleteOnExit();
byte[] testData = new byte[2048];
Random random = new Random();
random.nextBytes(testData);
try (ZipOutputStream zos = new ZipOutputStream(new FileOutputStream(zipFile))) {
ZipEntry entry = new ZipEntry("test");
entry.setSize(testData.length);
zos.putNextEntry(entry);
zos.write(testData);
zos.closeEntry();
zos.close();
}
}
Aggregations