This reverts commit 6932011bf9
.
This commit is contained in:
parent
6932011bf9
commit
bd6c979b1e
|
@ -1,48 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>testng</artifactId>
|
||||
<version>0.1.0-SNAPSHOT</version>
|
||||
<name>testng-jenkins</name>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>testing-modules</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
<testng.version>7.6.1</testng.version>
|
||||
</properties>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
<artifactId>testng</artifactId>
|
||||
<version>${testng.version}</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<configuration>
|
||||
<suiteXmlFiles>
|
||||
<suiteXmlFile>
|
||||
src\test\resources\test_suite.xml
|
||||
</suiteXmlFile>
|
||||
</suiteXmlFiles>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
|
||||
|
||||
</project>
|
|
@ -1,26 +0,0 @@
|
|||
package com.baeldung;
|
||||
|
||||
import static org.testng.AssertJUnit.assertEquals;
|
||||
import org.testng.annotations.AfterClass;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
public class TestNGSampleTestForNumberAddition {
|
||||
int firstNumber, secondNumber;
|
||||
|
||||
@BeforeClass
|
||||
public void setup() {
|
||||
firstNumber = 13;
|
||||
secondNumber = 24;
|
||||
}
|
||||
|
||||
@AfterClass
|
||||
public void tearDown() {
|
||||
firstNumber = secondNumber = 0;
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenNumbers_whenSumIsOdd_thenTrue() {
|
||||
assertEquals(1, ( firstNumber + secondNumber ) % 2);
|
||||
}
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
package com.baeldung;
|
||||
|
||||
import static org.testng.AssertJUnit.assertEquals;
|
||||
import org.testng.annotations.BeforeClass;
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
public class TestNGSampleTestForStringLength {
|
||||
|
||||
String name;
|
||||
|
||||
@BeforeClass
|
||||
public void setup() {
|
||||
name = "Hannah";
|
||||
}
|
||||
|
||||
@Test
|
||||
public void givenString_whenEvenLength_thenTrue() {
|
||||
assertEquals(0, name.length() % 2);
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd" >
|
||||
|
||||
<suite name="suite">
|
||||
<test name="test suite">
|
||||
<classes>
|
||||
<class name="com.baeldung.TestNGSampleTestForStringLength" />
|
||||
<class name="com.baeldung.TestNGSampleTestForNumberAddition" />
|
||||
</classes>
|
||||
</test>
|
||||
</suite>
|
Loading…
Reference in New Issue