From 2f7f14670c6b965cc9d467516320cecc62e67416 Mon Sep 17 00:00:00 2001 From: ghubstan <36207203+ghubstan@users.noreply.github.com> Date: Mon, 28 Dec 2020 14:32:16 -0300 Subject: [PATCH] Replace junit with jupiter asserts Don't mix junit and jupter apis, apitest should only be using jupiter. Also moved a file.deleteOnExit statement within the method that created the file. --- .../apitest/method/payment/AbstractPaymentAccountTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apitest/src/test/java/bisq/apitest/method/payment/AbstractPaymentAccountTest.java b/apitest/src/test/java/bisq/apitest/method/payment/AbstractPaymentAccountTest.java index e83bfe6db7..c31daec51d 100644 --- a/apitest/src/test/java/bisq/apitest/method/payment/AbstractPaymentAccountTest.java +++ b/apitest/src/test/java/bisq/apitest/method/payment/AbstractPaymentAccountTest.java @@ -33,7 +33,7 @@ import static bisq.apitest.config.BisqAppConfig.alicedaemon; import static java.lang.String.format; import static java.lang.System.getProperty; import static java.nio.charset.StandardCharsets.UTF_8; -import static org.junit.Assert.*; +import static org.junit.jupiter.api.Assertions.*; @@ -176,7 +176,6 @@ public class AbstractPaymentAccountTest extends MethodTest { tmpJsonForm = File.createTempFile("temp_acct_form_", ".json", Paths.get(getProperty("java.io.tmpdir")).toFile()); - tmpJsonForm.deleteOnExit(); JsonWriter writer = new JsonWriter(new OutputStreamWriter(new FileOutputStream(tmpJsonForm), UTF_8)); writer.beginObject(); @@ -199,6 +198,7 @@ public class AbstractPaymentAccountTest extends MethodTest { log.error("", ex); fail(format("Could not write json file from form entries %s", COMPLETED_FORM_MAP)); } + tmpJsonForm.deleteOnExit(); return tmpJsonForm; } }