Changing the new test frame work to testng

4.x.x
Geeth Munasinghe 10 years ago
parent eb734a4b14
commit 33812ec50f

@ -120,9 +120,8 @@
<version>${jboss-transaction-api.version}</version> <version>${jboss-transaction-api.version}</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>junit</groupId> <groupId>org.testng</groupId>
<artifactId>junit</artifactId> <artifactId>testng</artifactId>
<scope>test</scope>
</dependency> </dependency>
</dependencies> </dependencies>

@ -20,18 +20,18 @@ package org.wso2.carbon.device.mgt.core;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; 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 { public class DeviceManagementTestCase {
private static final Log log = LogFactory.getLog(DeviceManagementTestCase.class); 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 { public void setUp() throws Exception {
log.info("Testing started."); log.info("Testing started.");
assertEquals("A", "A"); Assert.assertEquals("A", "A");
} }
} }

@ -137,17 +137,26 @@
<!--Test dependencies--> <!--Test dependencies-->
<!--
<dependency> <dependency>
<groupId>junit</groupId> <groupId>junit</groupId>
<artifactId>junit</artifactId> <artifactId>junit</artifactId>
<version>4.12-beta-3</version> <version>4.12-beta-3</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
-->
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>${testng.version}</version>
</dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
<properties> <properties>
<testng.version>6.1.1</testng.version>
<carbon.kernel.version>4.3.0-SNAPSHOT</carbon.kernel.version> <carbon.kernel.version>4.3.0-SNAPSHOT</carbon.kernel.version>
<carbon.platform.version>4.3.0-SNAPSHOT</carbon.platform.version> <carbon.platform.version>4.3.0-SNAPSHOT</carbon.platform.version>
<carbon.p2.plugin.version>1.5.4</carbon.p2.plugin.version> <carbon.p2.plugin.version>1.5.4</carbon.p2.plugin.version>

Loading…
Cancel
Save