Skip to content
Snippets Groups Projects
Commit 21237272 authored by René Schöne's avatar René Schöne
Browse files

Move resources to test and cleanup.

parent 17535891
No related branches found
No related tags found
No related merge requests found
Showing
with 2 additions and 5 deletions
...@@ -16,8 +16,6 @@ import org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl; ...@@ -16,8 +16,6 @@ import org.eclipse.emf.ecore.xmi.impl.XMLParserPoolImpl;
import java.io.IOException; import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
......
...@@ -8,7 +8,6 @@ import de.tudresden.inf.st.ttc18live.translator.XmlToJastaddTranslator; ...@@ -8,7 +8,6 @@ import de.tudresden.inf.st.ttc18live.translator.XmlToJastaddTranslator;
import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBContext;
import javax.xml.bind.Unmarshaller; import javax.xml.bind.Unmarshaller;
import java.io.IOException;
import java.nio.file.Path; import java.nio.file.Path;
import java.nio.file.Paths; import java.nio.file.Paths;
......
...@@ -175,7 +175,7 @@ public class Main { ...@@ -175,7 +175,7 @@ public class Main {
private static XmlToJastaddTranslator parseSocialNetwork() throws JAXBException, ParseException { private static XmlToJastaddTranslator parseSocialNetwork() throws JAXBException, ParseException {
JAXBContext jc = JAXBContext.newInstance(ParsedSocialNetwork.class); JAXBContext jc = JAXBContext.newInstance(ParsedSocialNetwork.class);
Unmarshaller unmarshaller = jc.createUnmarshaller(); Unmarshaller unmarshaller = jc.createUnmarshaller();
Path model1Content = Paths.get("src", "main", "resources", Integer.toString(changeSet), "initial.xmi"); Path model1Content = Paths.get("src", "test", "resources", Integer.toString(changeSet), "initial.xmi");
ParsedSocialNetwork parsedSocialNetwork = (ParsedSocialNetwork) unmarshaller.unmarshal(model1Content.toFile()); ParsedSocialNetwork parsedSocialNetwork = (ParsedSocialNetwork) unmarshaller.unmarshal(model1Content.toFile());
logger.info("Users: {}, Posts: {}", logger.info("Users: {}, Posts: {}",
parsedSocialNetwork.users.size(), parsedSocialNetwork.posts.size()); parsedSocialNetwork.users.size(), parsedSocialNetwork.posts.size());
...@@ -190,7 +190,7 @@ public class Main { ...@@ -190,7 +190,7 @@ public class Main {
JAXBContext jc = JAXBContext.newInstance(ParsedModelChangeSet.class); JAXBContext jc = JAXBContext.newInstance(ParsedModelChangeSet.class);
Unmarshaller unmarshaller = jc.createUnmarshaller(); Unmarshaller unmarshaller = jc.createUnmarshaller();
unmarshaller.setEventHandler(new javax.xml.bind.helpers.DefaultValidationEventHandler()); unmarshaller.setEventHandler(new javax.xml.bind.helpers.DefaultValidationEventHandler());
Path modelContent = Paths.get("src", "main", "resources", Integer.toString(changeSet), suffix); Path modelContent = Paths.get("src", "test", "resources", Integer.toString(changeSet), suffix);
if (!modelContent.toFile().exists()) { if (!modelContent.toFile().exists()) {
logger.warn("File {} does not exist!", modelContent); logger.warn("File {} does not exist!", modelContent);
return null; return null;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment