From 19c1698a1c9d576637a80b20afa080db5e16addb Mon Sep 17 00:00:00 2001
From: davidely <davidely@localhost>
Date: Sun, 03 Sep 2006 14:40:08 +0000
Subject: [PATCH] Migrating to TestNG 5.1 from 4.7. Most of the required changes are to address annotations that were deprecated.
---
opends/tests/unit-tests-testng/src/server/org/opends/server/backends/jeb/TestEnvManager.java | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/backends/jeb/TestEnvManager.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/backends/jeb/TestEnvManager.java
index 05b9e23..73cd024 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/backends/jeb/TestEnvManager.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/backends/jeb/TestEnvManager.java
@@ -30,9 +30,9 @@
import java.io.File;
-import org.testng.annotations.Configuration;
-import org.testng.annotations.ExpectedExceptions;
import org.testng.annotations.Test;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.AfterClass;
import org.opends.server.TestCaseUtils;
import com.sleepycat.je.Environment;
@@ -51,7 +51,7 @@
* @throws Exception
* If the environment could not be set up.
*/
- @Configuration(beforeTestClass = true)
+ @BeforeClass
public void setUp() throws Exception {
tempDir = TestCaseUtils.createTemporaryDirectory("jebtest");
homeDirName = tempDir.getAbsolutePath();
@@ -63,7 +63,7 @@
* @throws Exception
* If the environment could not be finalized.
*/
- @Configuration(afterTestClass = true)
+ @AfterClass
public void tearDown() throws Exception {
TestCaseUtils.deleteDirectory(tempDir);
}
@@ -98,8 +98,7 @@
* @throws Exception
* If the test failed unexpectedly.
*/
- @ExpectedExceptions(value = JebException.class)
- @Test()
+ @Test(expectedExceptions = JebException.class)
public void testInvalidHomeDir() throws Exception {
File tempFile = File.createTempFile("jebtest", "");
tempFile.deleteOnExit();
--
Gitblit v1.10.0