|
@@ -5,10 +5,15 @@ import org.junit.jupiter.api.Test;
|
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
|
|
|
|
|
public class TestPlJavaJSword {
|
|
public class TestPlJavaJSword {
|
|
|
|
+ private static final String KJV_GEN_1_1 = "In the beginning God created the heaven and the earth.";
|
|
|
|
+ private static final String MKJV_GEN_1_1 = "In the beginning God created the heaven and the earth.";
|
|
private static final String KJV_GEN_1_1_3 = "In the beginning God created the heaven and the earth. And the earth was without form, and void; and darkness was upon the face of the deep. And the Spirit of God moved upon the face of the waters. And God said, Let there be light: and there was light.";
|
|
private static final String KJV_GEN_1_1_3 = "In the beginning God created the heaven and the earth. And the earth was without form, and void; and darkness was upon the face of the deep. And the Spirit of God moved upon the face of the waters. And God said, Let there be light: and there was light.";
|
|
private static final String MKJV_GEN_1_1_3 = "In the beginning God created the heaven and the earth. And the earth was without form and empty. And darkness was on the face of the deep. And the Spirit of God moved on the face of the waters. And God said, Let there be light. And there was light.";
|
|
private static final String MKJV_GEN_1_1_3 = "In the beginning God created the heaven and the earth. And the earth was without form and empty. And darkness was on the face of the deep. And the Spirit of God moved on the face of the waters. And God said, Let there be light. And there was light.";
|
|
private static final String ESV_GEN_1_1 = "In the beginning, God created the heavens and the earth.";
|
|
private static final String ESV_GEN_1_1 = "In the beginning, God created the heavens and the earth.";
|
|
private static final String ESV_MT_6_33 = "But seek first the kingdom of God and his righteousness, and all these things will be added to you.";
|
|
private static final String ESV_MT_6_33 = "But seek first the kingdom of God and his righteousness, and all these things will be added to you.";
|
|
|
|
+ private static final String ESV_PSALM_150 = "Praise the Lord! Praise God in his sanctuary; praise him in his mighty heavens! Praise him for his mighty deeds; praise him according to his excellent greatness! Praise him with trumpet sound; praise him with lute and harp! Praise him with tambourine and dance; praise him with strings and pipe! Praise him with sounding cymbals; praise him with loud clashing cymbals! Let everything that has breath praise the Lord! Praise the Lord!";
|
|
|
|
+ private static final String ESV_2COR_12_19 = "But he said to me, My grace is sufficient for you, for my power is made perfect in weakness. Therefore I will boast all the more gladly of my weaknesses, so that the power of Christ may rest upon me.";
|
|
|
|
+ private static final String KJV_ACTS_1_8 = "But ye shall receive power, after that the Holy Ghost is come upon you: and ye shall be witnesses unto me both in Jerusalem, and in all Judæa, and in Samaria, and unto the uttermost part of the earth.";
|
|
@Test
|
|
@Test
|
|
public void testIsValidVerseValidVerse(){
|
|
public void testIsValidVerseValidVerse(){
|
|
assertEquals(true, PlJavaJSword.isValidVerse("Gen 1:1"));
|
|
assertEquals(true, PlJavaJSword.isValidVerse("Gen 1:1"));
|
|
@@ -19,7 +24,7 @@ public class TestPlJavaJSword {
|
|
}
|
|
}
|
|
@Test
|
|
@Test
|
|
public void testText() throws BookException {
|
|
public void testText() throws BookException {
|
|
- assertEquals("In the beginning God created the heaven and the earth.", PlJavaJSword.getText("KJV", "Genesis 1:1"));
|
|
|
|
|
|
+ assertEquals(KJV_GEN_1_1, PlJavaJSword.getText("KJV", "Genesis 1:1"));
|
|
}
|
|
}
|
|
@Test
|
|
@Test
|
|
public void testTextParse() throws BookException {
|
|
public void testTextParse() throws BookException {
|
|
@@ -34,12 +39,15 @@ public class TestPlJavaJSword {
|
|
assertEquals(MKJV_GEN_1_1_3, PlJavaJSword.getText("MKJV", "Genesis 1:1-3"));
|
|
assertEquals(MKJV_GEN_1_1_3, PlJavaJSword.getText("MKJV", "Genesis 1:1-3"));
|
|
}
|
|
}
|
|
@Test
|
|
@Test
|
|
- public void testTextParseMore() throws BookException {
|
|
|
|
|
|
+ public void testTextParseElementsAndPunctuation() throws BookException {
|
|
assertEquals(ESV_MT_6_33, PlJavaJSword.getText("ESV", "Mt. 6:33"));
|
|
assertEquals(ESV_MT_6_33, PlJavaJSword.getText("ESV", "Mt. 6:33"));
|
|
|
|
+ assertEquals(ESV_PSALM_150, PlJavaJSword.getText("ESV", "Ps. 150"));
|
|
|
|
+ assertEquals(ESV_2COR_12_19, PlJavaJSword.getText("ESV", "2 Cor. 12:9"));
|
|
|
|
+ assertEquals(KJV_ACTS_1_8, PlJavaJSword.getText("KJV", "Acts 1:8"));
|
|
}
|
|
}
|
|
@Test
|
|
@Test
|
|
public void testDefaultText() throws BookException {
|
|
public void testDefaultText() throws BookException {
|
|
- assertEquals("In the beginning God created the heaven and the earth.", PlJavaJSword.getDefaultText("Genesis 1:1"));
|
|
|
|
|
|
+ assertEquals(MKJV_GEN_1_1, PlJavaJSword.getDefaultText("Genesis 1:1"));
|
|
}
|
|
}
|
|
@Test
|
|
@Test
|
|
public void testDefaultTextMany() throws BookException {
|
|
public void testDefaultTextMany() throws BookException {
|