From 33812ec50f60a8a11671ea95d3f48a2228490a0b Mon Sep 17 00:00:00 2001 From: Geeth Munasinghe Date: Mon, 8 Dec 2014 16:31:10 +0530 Subject: [PATCH] Changing the new test frame work to testng --- .../device-mgt/org.wso2.carbon.device.mgt.core/pom.xml | 5 ++--- .../carbon/device/mgt/core/DeviceManagementTestCase.java | 8 ++++---- pom.xml | 9 +++++++++ 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml index aa60bc7c1c6..0490197ae02 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/pom.xml @@ -120,9 +120,8 @@ ${jboss-transaction-api.version} - junit - junit - test + org.testng + testng diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/DeviceManagementTestCase.java b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/DeviceManagementTestCase.java index dae28fdfe9c..e72afb3c209 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/DeviceManagementTestCase.java +++ b/components/device-mgt/org.wso2.carbon.device.mgt.core/src/test/java/org/wso2/carbon/device/mgt/core/DeviceManagementTestCase.java @@ -20,18 +20,18 @@ package org.wso2.carbon.device.mgt.core; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.junit.Test; +import org.testng.Assert; +import org.testng.annotations.Test; -import static org.junit.Assert.assertEquals; public class DeviceManagementTestCase { private static final Log log = LogFactory.getLog(DeviceManagementTestCase.class); - @Test + @Test(groups = "device.mgt.test", description = "Testing the first test case with testng.") public void setUp() throws Exception { log.info("Testing started."); - assertEquals("A", "A"); + Assert.assertEquals("A", "A"); } } diff --git a/pom.xml b/pom.xml index 30b35934b59..230c223dc42 100644 --- a/pom.xml +++ b/pom.xml @@ -137,17 +137,26 @@ + + + + org.testng + testng + ${testng.version} + + 6.1.1 4.3.0-SNAPSHOT 4.3.0-SNAPSHOT 1.5.4