Commit 3831009b authored by Anna Maria Schmitz's avatar Anna Maria Schmitz

Update SomeIPGenerationTest.java

parent 988d0746
Pipeline #178160 failed with stages
in 8 minutes and 38 seconds
......@@ -2,11 +2,12 @@ package de.monticore.lang.monticar.generator.middleware;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.cncModel.EMAPortSymbol;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.instanceStructure.EMAComponentInstanceSymbol;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.ros.RosToEmamTagSchema;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.someip.SomeIPToEmamTagSchema;
import de.monticore.lang.embeddedmontiarc.tagging.middleware.someip.SomeIPConnectionSymbol;
import de.monticore.lang.monticar.generator.middleware.impls.CPPGenImpl;
import de.monticore.lang.monticar.generator.someip.GeneratorSomeIP;
import de.monticore.lang.monticar.generator.middleware.impls.SomeIPGenImpl;
import de.monticore.lang.monticar.generator.someip.helper.SomeIPTagHelper;
import de.monticore.lang.tagging._symboltable.TagSymbol;
import de.monticore.lang.tagging._symboltable.TaggingResolver;
import org.junit.Test;
......@@ -28,37 +29,11 @@ public class SomeIPGenerationTest extends AbstractSymtabTest {
public void testSomeIPGeneration() throws IOException {
TaggingResolver taggingResolver = createSymTabAndTaggingResolver(TEST_PATH);
EMAComponentInstanceSymbol componentInstanceSymbol = taggingResolver.<EMAComponentInstanceSymbol>resolve("tests.a.addComp", EMAComponentInstanceSymbol.KIND).orElse(null);
RosToEmamTagSchema.registerTagTypes(taggingResolver);
SomeIPToEmamTagSchema.registerTagTypes(taggingResolver);
assertNotNull(componentInstanceSymbol);
File directory = new File(OUT_BASE + "addComp/src/tests_a_addComp/someip");
directory.mkdirs();
GeneratorSomeIP generatorSomeIP = new GeneratorSomeIP();
generatorSomeIP.setGenerationTargetPath(OUT_BASE);
generatorSomeIP.generateSomeIPAdapter(componentInstanceSymbol);
componentInstanceSymbol.getPortInstance("in1").orElse(null).setMiddlewareSymbol(new SomeIPConnectionSymbol(1,2,3));
//Map<EMAPortSymbol, SomeIPConnectionSymbol> someIPConnectionSymbols = new HashMap<>();
//componentInstanceSymbol.getPortInstanceList().forEach(p -> {
// Collection<TagSymbol> tmpTags = taggingResolver.getTags(p, SomeIPConnectionSymbol.KIND);
// if (tmpTags.size() == 1) {
// someIPConnectionSymbols.put(p, (SomeIPConnectionSymbol) tmpTags.iterator().next());
// }
//});
//EMAPortInstanceSymbol in1 = componentInstanceSymbol.getPortInstance("in1").orElse(null);
//assertNotNull(in1);
//EMAPortInstanceSymbol in2 = componentInstanceSymbol.getPortInstance("in2").orElse(null);
//assertNotNull(in2);
//EMAPortInstanceSymbol out1 = componentInstanceSymbol.getPortInstance("out1").orElse(null);
//assertNotNull(out1);
//in1.setMiddlewareSymbol(new SomeIPConnectionSymbol(1, 2, 3));
//in2.setMiddlewareSymbol(new SomeIPConnectionSymbol(4, 5, 6));
//out1.setMiddlewareSymbol(new SomeIPConnectionSymbol(7, 8, 9));
SomeIPTagHelper.resolveTags(taggingResolver, componentInstanceSymbol);
DistributedTargetGenerator distributedTargetGenerator = new DistributedTargetGenerator();
distributedTargetGenerator.setGenerationTargetPath(OUT_BASE + "addComp/src");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment