From c817aec2dc5303da4aca06bd222b6c21704cee24 Mon Sep 17 00:00:00 2001 From: dhruba619 Date: Sun, 2 Apr 2017 21:20:31 +0530 Subject: [PATCH] BAEL-716 Junit vs testng improvement updated formatting --- .../com/baeldung/junit4vstestng/SortedTests.java | 15 ++++++--------- .../src/test/java/baeldung/com/PriorityTest.java | 6 ++---- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/core-java/src/test/java/com/baeldung/junit4vstestng/SortedTests.java b/core-java/src/test/java/com/baeldung/junit4vstestng/SortedTests.java index 1fa4a4e61b..fe0ec1469c 100644 --- a/core-java/src/test/java/com/baeldung/junit4vstestng/SortedTests.java +++ b/core-java/src/test/java/com/baeldung/junit4vstestng/SortedTests.java @@ -6,20 +6,17 @@ import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.runners.MethodSorters; - @FixMethodOrder(MethodSorters.NAME_ASCENDING) public class SortedTests { - + @Test - public void a_givenString_whenChangedtoInt_thenTrue(){ - assertTrue( - Integer.valueOf("10") instanceof Integer); + public void a_givenString_whenChangedtoInt_thenTrue() { + assertTrue(Integer.valueOf("10") instanceof Integer); } - + @Test - public void b_givenInt_whenChangedtoString_thenTrue(){ - assertTrue( - String.valueOf(10) instanceof String); + public void b_givenInt_whenChangedtoString_thenTrue() { + assertTrue(String.valueOf(10) instanceof String); } } diff --git a/testng/src/test/java/baeldung/com/PriorityTest.java b/testng/src/test/java/baeldung/com/PriorityTest.java index 34f2d6fe47..d014d5c920 100644 --- a/testng/src/test/java/baeldung/com/PriorityTest.java +++ b/testng/src/test/java/baeldung/com/PriorityTest.java @@ -10,14 +10,12 @@ public class PriorityTest { @Test(priority = 1) public void givenString_whenChangedToInt_thenCorrect() { - Assert.assertTrue( - Integer.valueOf(testString) instanceof Integer); + Assert.assertTrue(Integer.valueOf(testString) instanceof Integer); } @Test(priority = 2) public void givenInt_whenChangedToString_thenCorrect() { - Assert.assertTrue( - String.valueOf(testInt) instanceof String); + Assert.assertTrue(String.valueOf(testInt) instanceof String); } }