Exclude
Exclude
package arithmeticOperation;
import org.testng.Assert;
import org.testng.annotations.Test;
// Write Hard Assertion (assertEquals) for each method and try to pass the
execution.
@Test
public void addMeth_1(){
int a = 0;
int b = 0;
int c = a+b;
Assert.assertEquals(c,0);
System.out.println("Successfully Executed Add Method-1 & The Value
is :"+ c);
}
@Test
public void addMeth_2(){
int a = 0;
int b = 0;
int c = a+b;
Assert.assertEquals(c,0);
System.out.println("Successfully Executed Add Method-2 & The Value
is :"+ c);
}
@Test
public void addMeth_3(){
int a = 0;
int b = 0;
int c = a+b;
Assert.assertEquals(c,0);
2)Multiplication:
package arithmeticOperation;
import org.testng.annotations.Test;
@Test
public void multMeth_1(){
int a = 0;
int b = 0;
int c = a*b;
@Test
public void multMeth_2(){
int a = 0;
int b = 0;
int c = a*b;
@Test
public void multMeth_3(){
int a = 0;
int b = 0;
int c = a*b;
3)Subtraction:
package arithmeticOperation;
import org.testng.annotations.Test;
@Test
public void subMeth_1(){
int a = 0;
int b = 0;
int c = a-b;
@Test
public void subMeth_2(){
int a = 0;
int b = 0;
int c = a-b;
System.out.println("Successfully Executed Subtraction Method-2 & The
Value is :"+ c);
}
@Test
public void subMeth_3(){
int a = 0;
int b = 0;
int c = a-b;
@Test
public void Sub_Method(){
int a = 0;
int b = 0;
int c = a-b;
4)testing.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Loan">
<!-- Write the testng.xml for all the Exclude Test Tags as mentioned -->
</suite>