migrated to Java 8

This commit is contained in:
jomu
2014-03-21 10:17:53 +00:00
parent 7e926effef
commit d19fe07b6f
33 changed files with 177 additions and 129 deletions

View File

@ -5,6 +5,8 @@
*/
package de.muehlencord.shared.util;
import static de.muehlencord.shared.util.OSUtil.getOperationSystem;
import static java.lang.System.getProperties;
import org.junit.Test;
import static org.junit.Assert.*;
@ -19,8 +21,8 @@ public class OSUtilTest {
*/
@Test
public void testGetOS() {
String osName = System.getProperties().getProperty("os.name").toUpperCase();
int os = OSUtil.getOperationSystem();
String osName = getProperties().getProperty("os.name").toUpperCase();
int os = getOperationSystem();
switch (osName) {
case "LINUX":

View File

@ -1,5 +1,6 @@
package de.muehlencord.shared.util;
import static de.muehlencord.shared.util.StringUtil.getValueBetweenKeywords;
import java.io.IOException;
import java.text.ParseException;
import static org.junit.Assert.*;
@ -16,7 +17,7 @@ public class StringUtilTest extends DefaultTest {
public void testGetValueBetweenKeywords() throws ParseException, IOException {
String content = readContentFromFile("test.txt");
String ipAddress = StringUtil.getValueBetweenKeywords(content, "The IP", "has just");
String ipAddress = getValueBetweenKeywords(content, "The IP", "has just");
assertEquals("ipAddress", "222.184.230.118", ipAddress);
}
}

View File

@ -4,6 +4,7 @@
*/
package de.muehlencord.shared.util.file;
import static de.muehlencord.shared.util.file.FileUtil.getFilesFromDirecotry;
import java.io.File;
import java.net.URISyntaxException;
import java.net.URL;
@ -29,7 +30,7 @@ public class FileUtilTest {
URL url = getClass().getResource("testfile.txt");
File testFile = new File(url.getFile());
List<File> fileList = FileUtil.getFilesFromDirecotry(testFile.getParent(), ".*.java");
List<File> fileList = getFilesFromDirecotry(testFile.getParent(), ".*.java");
Iterator<File> it = fileList.iterator();
while (it.hasNext()) {
System.out.println(it.next());