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
1 parent
e5aefb5
commit a669a01
Showing
1 changed file
with
29 additions
and
28 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 |
---|---|---|
@@ -1,39 +1,40 @@ | ||
package com.fishercoder; | ||
|
||
import com.fishercoder.solutions._68; | ||
import org.junit.jupiter.api.BeforeEach; | ||
import org.junit.jupiter.api.Test; | ||
|
||
import java.util.Arrays; | ||
import org.junit.BeforeClass; | ||
import org.junit.Test; | ||
|
||
import static org.junit.Assert.assertEquals; | ||
import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
||
public class _68Test { | ||
private static _68.Solution1 solution1; | ||
private static String[] words; | ||
private static _68.Solution1 solution1; | ||
private static String[] words; | ||
|
||
@BeforeClass | ||
public static void setup() { | ||
solution1 = new _68.Solution1(); | ||
} | ||
@BeforeEach | ||
public void setup() { | ||
solution1 = new _68.Solution1(); | ||
} | ||
|
||
@Test | ||
public void test1() { | ||
words = | ||
new String[] {"This", "is", "a", "good", "test!", "\n", "What", "do", "you", "\n", "think?", | ||
"\n", "I", "think", "so", "too!"}; | ||
assertEquals(Arrays.asList( | ||
"This is a good", | ||
"test! \n What do", | ||
"you \n think? \n I", | ||
"think so too! "), solution1.fullJustify(words, 16)); | ||
} | ||
@Test | ||
public void test1() { | ||
words = | ||
new String[]{"This", "is", "a", "good", "test!", "\n", "What", "do", "you", "\n", "think?", | ||
"\n", "I", "think", "so", "too!"}; | ||
assertEquals(Arrays.asList( | ||
"This is a good", | ||
"test! \n What do", | ||
"you \n think? \n I", | ||
"think so too! "), solution1.fullJustify(words, 16)); | ||
} | ||
|
||
@Test | ||
public void test2() { | ||
words = new String[] {"This", "is", "an", "example", "of", "text", "justification."}; | ||
assertEquals(Arrays.asList( | ||
"This is an", | ||
"example of text", | ||
"justification. "), solution1.fullJustify(words, 16)); | ||
} | ||
@Test | ||
public void test2() { | ||
words = new String[]{"This", "is", "an", "example", "of", "text", "justification."}; | ||
assertEquals(Arrays.asList( | ||
"This is an", | ||
"example of text", | ||
"justification. "), solution1.fullJustify(words, 16)); | ||
} | ||
} |