-
Notifications
You must be signed in to change notification settings - Fork 565
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
201 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package tbs; | ||
|
||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
import static org.junit.Assert.assertThat; | ||
|
||
public class AssertionRouletteTest { | ||
@Test | ||
public void testCloneNonBareRepoFromLocalTestServer() throws Exception { | ||
Calculate calculate = new Calculate(); | ||
int result = calculate.add(7, 8); | ||
int success = 15; | ||
assertEquals(success, result); | ||
|
||
int subResult = calculate.sub(9, 2); | ||
int subSuccess = 7; | ||
assertEquals(subSuccess, subResult); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package tbs; | ||
|
||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class ConditionalTest { | ||
@Test | ||
public void byGod() { | ||
Calculate calculate = new Calculate(); | ||
// just examples | ||
if (calculate.add(7, 9) == 16) { | ||
if (calculate.sub(12, 9) == 3) { | ||
int subSuccess = 7; | ||
assertEquals(subSuccess, calculate.sub(9, 2)); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package tbs; | ||
|
||
import org.junit.Before; | ||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class ConstructorInitializationTest { | ||
@Before | ||
public void init() throws Exception { | ||
|
||
} | ||
|
||
@Test | ||
public void name() { | ||
Calculate calculate = new Calculate(); | ||
int result = calculate.add(7, 8); | ||
int success = 15; | ||
assertEquals(success, result); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package tbs; | ||
|
||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class DuplicateAssertTest { | ||
@Test | ||
public void testXmlSanitizer() { | ||
boolean valid = XmlSanitizer.isValid("Fritzbox"); | ||
assertEquals("Fritzbox is valid", true, valid); | ||
|
||
valid = XmlSanitizer.isValid("Fritz Box"); | ||
assertEquals("Spaces are valid", true, valid); | ||
|
||
valid = XmlSanitizer.isValid("Frützbüx"); | ||
assertEquals("Frützbüx is invalid", false, valid); | ||
|
||
valid = XmlSanitizer.isValid("Fritz!box"); | ||
assertEquals("Exclamation mark is valid", true, valid); | ||
|
||
valid = XmlSanitizer.isValid("Fritz!box"); | ||
assertEquals("Exclamation mark is valid", true, valid); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package tbs; | ||
|
||
import org.junit.Test; | ||
|
||
public class EmptyTest { | ||
|
||
@Test | ||
public void testCredGetFullSampleV1() throws Throwable { | ||
// ScrapedCredentials credentials = innerCredTest(FULL_SAMPLE_v1); | ||
// assertEquals("p4ssw0rd", credentials.pass); | ||
// assertEquals("[email protected]",credentials.user); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package tbs; | ||
|
||
import org.junit.Ignore; | ||
|
||
public class IgnoreTest { | ||
@Ignore("Oops, Not Time fix it") | ||
public void peerPriority() throws Exception { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package tbs; | ||
|
||
import org.junit.Test; | ||
|
||
import java.util.Calendar; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class MagicNumberTest { | ||
@Test | ||
public void testGetLocalTimeAsCalendar() { | ||
int result = 7 + 8; | ||
assertEquals(15, result); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package tbs; | ||
|
||
import org.junit.Test; | ||
|
||
import java.io.FileNotFoundException; | ||
import java.io.FileOutputStream; | ||
import java.io.IOException; | ||
|
||
public class MysteryGuestTest { | ||
@Test | ||
public void testPersistence() throws Exception { | ||
try (FileOutputStream out = new FileOutputStream("people.bin");) { | ||
int result = 5; | ||
out.write(result); | ||
} catch (FileNotFoundException e) { | ||
// blabla | ||
} catch (IOException e) { | ||
// blabla | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package tbs; | ||
|
||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
|
||
public class RedundantAssertionTest { | ||
@Test | ||
public void testTrue() { | ||
Calculate calculate = new Calculate(); | ||
int result = calculate.add(7, 8); | ||
int success = 15; | ||
|
||
assertEquals(true, true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package tbs; | ||
|
||
import org.junit.Test; | ||
|
||
public class RedundantPrintTest { | ||
@Test | ||
public void testTransform10mNEUAndBack() { | ||
String result = "a, b, c"; | ||
System.out.println("result = " + result); | ||
assertEquals(true, true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package tbs; | ||
|
||
import org.junit.Test; | ||
|
||
public class SleepyTest { | ||
@Test | ||
public void testEdictExternSearch() throws Exception { | ||
Thread.sleep(500); | ||
assertEquals(true, true); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
/* | ||
* | ||
* public for test call only | ||
* | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package tbs; | ||
|
||
import org.junit.Test; | ||
|
||
public class UnknownTest { | ||
@Test | ||
public void hitGetPOICategoriesApi() throws Exception { | ||
String a = "blabla"; | ||
String b = "blablac"; | ||
String c = a + b; | ||
Show(a, b); | ||
} | ||
} |