Commit cd65bb8c authored by Ievgen Strepkov's avatar Ievgen Strepkov
Browse files

The tests were optimized

parent ff4ff32e
......@@ -3,63 +3,65 @@ package de.monticore.lang.monticar.generator;
import de.monticore.lang.monticar.generator.order.simulator.AbstractSymtab;
import de.monticore.lang.tagging._symboltable.TaggingResolver;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Ignore;
import org.junit.Test;
import de.monticore.lang.embeddedmontiarc.embeddedmontiarc._symboltable.ExpandedComponentInstanceSymbol;
public class SimulatorTSTest extends AbstractSymtab{
private TaggingResolver symtab;
@Before
public void setUp() {
symtab = createSymTabAndTaggingResolver("src/test/resources/simulator-ts/visualization");
}
@Test
public void resolveModelDoorStatus() {
TaggingResolver symtab = createSymTabAndTaggingResolver("src/test/resources/simulator-ts/visualization");
ExpandedComponentInstanceSymbol instanceSymbol =
symtab.<ExpandedComponentInstanceSymbol>resolve("doors.doorStatus",
ExpandedComponentInstanceSymbol.KIND).orElse(null);
ExpandedComponentInstanceSymbol instanceSymbol = symtab.<ExpandedComponentInstanceSymbol>resolve("doors.doorStatus",
ExpandedComponentInstanceSymbol.KIND).orElse(null);
Assert.assertNotNull(instanceSymbol);
}
@Ignore
@Test
public void resolveModelGameOverTrigger() {
TaggingResolver symtab = createSymTabAndTaggingResolver("src/test/resources/simulator-ts/visualization");
ExpandedComponentInstanceSymbol instanceSymbol =
symtab.<ExpandedComponentInstanceSymbol>resolve("feature.gameOverTrigger",
ExpandedComponentInstanceSymbol.KIND).orElse(null);
ExpandedComponentInstanceSymbol instanceSymbol = symtab.<ExpandedComponentInstanceSymbol>resolve("feature.gameOverTrigger",
ExpandedComponentInstanceSymbol.KIND).orElse(null);
Assert.assertNotNull(instanceSymbol);
}
@Ignore
@Test
public void resolveModelBrakeLightsControl() {
TaggingResolver symtab = createSymTabAndTaggingResolver("src/test/resources/simulator-ts/visualization");
ExpandedComponentInstanceSymbol instanceSymbol =
symtab.<ExpandedComponentInstanceSymbol>resolve("lights.brakeLightsControl",
ExpandedComponentInstanceSymbol.KIND).orElse(null);
ExpandedComponentInstanceSymbol instanceSymbol = symtab.<ExpandedComponentInstanceSymbol>resolve("lights.brakeLightsControl",
ExpandedComponentInstanceSymbol.KIND).orElse(null);
Assert.assertNotNull(instanceSymbol);
}
@Ignore
@Test
public void resolveModelIndicatorStatus() {
TaggingResolver symtab = createSymTabAndTaggingResolver("src/test/resources/simulator-ts/visualization");
ExpandedComponentInstanceSymbol instanceSymbol =
symtab.<ExpandedComponentInstanceSymbol>resolve("lights.indicatorStatus",
ExpandedComponentInstanceSymbol.KIND).orElse(null);
ExpandedComponentInstanceSymbol instanceSymbol = symtab.<ExpandedComponentInstanceSymbol>resolve("lights.indicatorStatus",
ExpandedComponentInstanceSymbol.KIND).orElse(null);
Assert.assertNotNull(instanceSymbol);
}
@Ignore
@Test
public void resolveModelsLightTimer() {
TaggingResolver symtab = createSymTabAndTaggingResolver("src/test/resources/simulator-ts/visualization");
ExpandedComponentInstanceSymbol instanceSymbol =
symtab.<ExpandedComponentInstanceSymbol>resolve("lights.lightTimer",
ExpandedComponentInstanceSymbol.KIND).orElse(null);
ExpandedComponentInstanceSymbol instanceSymbol = symtab.<ExpandedComponentInstanceSymbol>resolve("lights.lightTimer",
ExpandedComponentInstanceSymbol.KIND).orElse(null);
Assert.assertNotNull(instanceSymbol);
}
......@@ -67,34 +69,29 @@ public class SimulatorTSTest extends AbstractSymtab{
@Ignore
@Test
public void resolveModel() {
TaggingResolver symtab = createSymTabAndTaggingResolver("src/test/resources/simulator-ts/visualization");
ExpandedComponentInstanceSymbol instanceSymbol =
symtab.<ExpandedComponentInstanceSymbol>resolve("main.sDCS",
ExpandedComponentInstanceSymbol.KIND).orElse(null);
ExpandedComponentInstanceSymbol instanceSymbol = symtab.<ExpandedComponentInstanceSymbol>resolve("main.sDCS",
ExpandedComponentInstanceSymbol.KIND).orElse(null);
Assert.assertNotNull(instanceSymbol);
}
@Test
public void resolveModelsConstantVelocity() {
TaggingResolver symtab = createSymTabAndTaggingResolver("src/test/resources/simulator-ts/visualization");
ExpandedComponentInstanceSymbol instanceSymbol =
symtab.<ExpandedComponentInstanceSymbol>resolve("movement.constantVelocity",
ExpandedComponentInstanceSymbol.KIND).orElse(null);
ExpandedComponentInstanceSymbol instanceSymbol = symtab.<ExpandedComponentInstanceSymbol>resolve("movement.constantVelocity",
ExpandedComponentInstanceSymbol.KIND).orElse(null);
Assert.assertNotNull(instanceSymbol);
}
@Ignore
@Test
public void resolveModelsSteeringControl() {
TaggingResolver symtab = createSymTabAndTaggingResolver("src/test/resources/simulator-ts/visualization");
ExpandedComponentInstanceSymbol instanceSymbol =
symtab.<ExpandedComponentInstanceSymbol>resolve("movement.steeringControl",
ExpandedComponentInstanceSymbol.KIND).orElse(null);
ExpandedComponentInstanceSymbol instanceSymbol = symtab.<ExpandedComponentInstanceSymbol>resolve("movement.steeringControl",
ExpandedComponentInstanceSymbol.KIND).orElse(null);
Assert.assertNotNull(instanceSymbol);
}
}
}
\ No newline at end of file
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