BAEL-716 Junit vs testng improvement

This commit is contained in:
dhruba619
2017-04-02 16:35:58 +05:30
parent ccd76faa60
commit d85f1640d7
2 changed files with 48 additions and 0 deletions
@@ -0,0 +1,23 @@
package baeldung.com;
import org.testng.Assert;
import org.testng.annotations.Test;
public class PriorityTest {
private String testString = "10";
private int testInt = 23;
@Test(priority = 1)
public void givenString_whenChangedToInt_thenCorrect() {
Assert.assertTrue(
Integer.valueOf(testString) instanceof Integer);
}
@Test(priority = 2)
public void givenInt_whenChangedToString_thenCorrect() {
Assert.assertTrue(
String.valueOf(testInt) instanceof String);
}
}