-
-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #259 from Fuzzlemann/master
PR for 3.6.4 (Fuzzlemann) (4)
- Loading branch information
Showing
5 changed files
with
59 additions
and
32 deletions.
There are no files selected for viewing
13 changes: 0 additions & 13 deletions
13
.idea/libraries/Maven__com_djrapitops_PlanPluginBridge_3_6_0.xml
This file was deleted.
Oops, something went wrong.
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
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
41 changes: 41 additions & 0 deletions
41
Plan/test/test/java/main/java/com/djrapitops/plan/utilities/dump/DumpLogTest.java
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,41 @@ | ||
package test.java.main.java.com.djrapitops.plan.utilities.dump; | ||
|
||
import main.java.com.djrapitops.plan.utilities.file.dump.DumpLog; | ||
import org.junit.Test; | ||
|
||
import java.util.Arrays; | ||
|
||
import static junit.framework.TestCase.assertEquals; | ||
|
||
/** | ||
* @author Fuzzlemann | ||
*/ | ||
public class DumpLogTest { | ||
|
||
@Test | ||
public void testDumpLogCreation() { | ||
DumpLog testLog = new DumpLog(); | ||
|
||
testLog.addHeader("Test Header"); | ||
testLog.add("StringValue", "Test"); | ||
testLog.add("BooleanValue", true); | ||
testLog.add("IterableValue", Arrays.asList("Iterable 1", "Iterable 2")); | ||
|
||
testLog.addLine(new StringBuilder("CharSequence Test")); | ||
testLog.addLines(new StringBuilder("CharSequences Test"), new StringBuilder("CharSequences Test")); | ||
testLog.addLines(Arrays.asList("Iterable 1", "Iterable 2")); | ||
|
||
String expResult = "\n--- Test Header ---\n" + | ||
"StringValue: Test\n" + | ||
"BooleanValue: true\n" + | ||
"IterableValue: Iterable 1, Iterable 2\n" + | ||
"CharSequence Test\n" + | ||
"CharSequences Test\n" + | ||
"CharSequences Test\n" + | ||
"Iterable 1\n" + | ||
"Iterable 2"; | ||
String result = testLog.toString(); | ||
|
||
assertEquals(expResult, 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