Moved unitary tests.
This commit is contained in:
parent
3f28d77fea
commit
2c28e9758a
2 changed files with 22 additions and 0 deletions
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
package fr.devinsy.strings;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
||||
|
@ -224,4 +225,21 @@ public class StringsUtilsTest
|
|||
source.set(1, null);
|
||||
Assert.assertTrue(StringsUtils.containsNull(source));
|
||||
}
|
||||
|
||||
/**
|
||||
* Load to string list URL 01.
|
||||
*
|
||||
* @throws IOException
|
||||
* Signals that an I/O exception has occurred.
|
||||
*/
|
||||
@Test
|
||||
public void testLoadResource01() throws IOException
|
||||
{
|
||||
//
|
||||
StringList source = StringsUtils.load(StringsUtilsTest.class.getResource("/fr/devinsy/strings/lines.txt"));
|
||||
|
||||
//
|
||||
Assert.assertEquals(4, source.size());
|
||||
Assert.assertEquals("trois", source.get(3 - 1));
|
||||
}
|
||||
}
|
||||
|
|
4
test/fr/devinsy/strings/lines.txt
Normal file
4
test/fr/devinsy/strings/lines.txt
Normal file
|
@ -0,0 +1,4 @@
|
|||
un
|
||||
deux
|
||||
trois
|
||||
quatre
|
Loading…
Reference in a new issue