Skip to content

Commit

Permalink
migrate 68 to junit5
Browse files Browse the repository at this point in the history
  • Loading branch information
fishercoder1534 committed Mar 10, 2024
1 parent e5aefb5 commit a669a01
Showing 1 changed file with 29 additions and 28 deletions.
57 changes: 29 additions & 28 deletions src/test/java/com/fishercoder/_68Test.java
@@ -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));
}
}

0 comments on commit a669a01

Please sign in to comment.