| | |
| | | */ |
| | | @DataProvider(name = "getBytesTestData") |
| | | public Object[][] createGetBytesTestData() { |
| | | List<String> strings = new LinkedList<String>(); |
| | | List<String> strings = new LinkedList<>(); |
| | | |
| | | // Some simple strings. |
| | | strings.add(""); |
| | |
| | | */ |
| | | @DataProvider(name = "isDigitTestData") |
| | | public Object[][] createIsDigitTestData() { |
| | | List<Object[]> data = new LinkedList<Object[]>(); |
| | | List<Object[]> data = new LinkedList<>(); |
| | | |
| | | for (char c = '0'; c <= '9'; c++) { |
| | | data.add(new Object[] { c, true }); |
| | |
| | | */ |
| | | @DataProvider(name = "isAlphaTestData") |
| | | public Object[][] createIsAlphaTestData() { |
| | | List<Object[]> data = new LinkedList<Object[]>(); |
| | | List<Object[]> data = new LinkedList<>(); |
| | | |
| | | for (char c = 'a'; c <= 'z'; c++) { |
| | | data.add(new Object[] { c, true }); |
| | |
| | | */ |
| | | @DataProvider(name = "isHexDigitTestData") |
| | | public Object[][] createIsHexDigitTestData() { |
| | | List<Object[]> data = new LinkedList<Object[]>(); |
| | | List<Object[]> data = new LinkedList<>(); |
| | | |
| | | for (char c = 'a'; c <= 'f'; c++) { |
| | | data.add(new Object[] { c, true }); |
| | |
| | | */ |
| | | @DataProvider(name = "needsBase64EncodingTestData") |
| | | public Object[][] createNeedsBase64EncodingTestData() { |
| | | List<Object[]> data = new LinkedList<Object[]>(); |
| | | List<Object[]> data = new LinkedList<>(); |
| | | |
| | | // Check SAFE-INIT-CHAR. |
| | | for (char c = '\u0000'; c < '\u0100'; c++) { |
| | |
| | | @Test(dataProvider = "listToArrayTestData") |
| | | public void testListToArray(String[] strings) throws Exception { |
| | | if (strings != null) { |
| | | List<String> list = new ArrayList<String>(strings.length); |
| | | List<String> list = new ArrayList<>(strings.length); |
| | | for (String string : strings) { |
| | | list.add(string); |
| | | } |
| | |
| | | public void testRecursiveDelete() throws Exception { |
| | | File dir0 = TestCaseUtils.createTemporaryDirectory("dst"); |
| | | |
| | | List<File> files = new LinkedList<File>(); |
| | | List<File> files = new LinkedList<>(); |
| | | |
| | | File dir1 = new File(dir0, "one"); |
| | | dir1.mkdir(); |