Commit 5d435450 authored by Paff's avatar Paff
Browse files

bug fixing caused by running example

tests 
parent 166f2d4e
...@@ -24,7 +24,7 @@ import secarc.prettyprint.MontiSecArcPrettyPrintWorkflow; ...@@ -24,7 +24,7 @@ import secarc.prettyprint.MontiSecArcPrettyPrintWorkflow;
* @version $Revision$, $Date$ * @version $Revision$, $Date$
* *
*/ */
public final class MontiSecArcAnalysis extends MontiSecArc { public final class MontiSecArcAnalysis extends MontiSecArcLanguage {
/** /**
* Factory method for {@link MontiSecArcAnalysis}. * Factory method for {@link MontiSecArcAnalysis}.
......
...@@ -23,7 +23,7 @@ import secarc.ets.transform.trustlevel.PreAnalysisTrustlevelTransformationWorkfl ...@@ -23,7 +23,7 @@ import secarc.ets.transform.trustlevel.PreAnalysisTrustlevelTransformationWorkfl
* @version $Revision$, $Date$ * @version $Revision$, $Date$
* *
*/ */
public final class MontiSecArcPreAnalysis extends MontiSecArc { public final class MontiSecArcPreAnalysis extends MontiSecArcLanguage {
/** /**
* Factory method for {@link MontiSecArcPreAnalysis}. * Factory method for {@link MontiSecArcPreAnalysis}.
......
...@@ -34,7 +34,7 @@ public final class AnalysisHelper { ...@@ -34,7 +34,7 @@ public final class AnalysisHelper {
STEntry element = null; STEntry element = null;
if(iterator.hasNext()) { while(iterator.hasNext()) {
element = iterator.next().getArchitectureElement(); element = iterator.next().getArchitectureElement();
if(element instanceof ConnectorEntry) { if(element instanceof ConnectorEntry) {
return (ConnectorEntry) element; return (ConnectorEntry) element;
......
...@@ -2,6 +2,7 @@ package secarc.ets.analysis.checker; ...@@ -2,6 +2,7 @@ package secarc.ets.analysis.checker;
import secarc.ets.entries.SecComponentEntry; import secarc.ets.entries.SecComponentEntry;
import mc.umlp.arcd._ast.ASTArcComponent; import mc.umlp.arcd._ast.ASTArcComponent;
import interfaces2.helper.EntryLoadingErrorException;
import interfaces2.resolvers.AmbigousException; import interfaces2.resolvers.AmbigousException;
/** /**
...@@ -27,7 +28,8 @@ public interface ISecAnalysisComponentChecker { ...@@ -27,7 +28,8 @@ public interface ISecAnalysisComponentChecker {
* @param advanced detailness of output * @param advanced detailness of output
* @return factor of analysis * @return factor of analysis
* @throws AmbigousException * @throws AmbigousException
* @throws EntryLoadingErrorException
*/ */
int check(ASTArcComponent node, SecComponentEntry entry, boolean advanced) throws AmbigousException; int check(ASTArcComponent node, SecComponentEntry entry, boolean advanced) throws AmbigousException, EntryLoadingErrorException;
} }
...@@ -87,7 +87,8 @@ public class EncryptedPathEndInLowTrustlevel extends DerivedTrustlevel implement ...@@ -87,7 +87,8 @@ public class EncryptedPathEndInLowTrustlevel extends DerivedTrustlevel implement
boolean encrypted = false; boolean encrypted = false;
//Boolean for unencrypted element //Boolean for unencrypted element
boolean unencryted = false; boolean unencryted = false;
//only new component, if a new connector is found
boolean newComponent = false;
//Trustlevel of the found componet //Trustlevel of the found componet
String trustlevel = "-2"; String trustlevel = "-2";
int trustlevelCompare = -1; int trustlevelCompare = -1;
...@@ -104,6 +105,8 @@ public class EncryptedPathEndInLowTrustlevel extends DerivedTrustlevel implement ...@@ -104,6 +105,8 @@ public class EncryptedPathEndInLowTrustlevel extends DerivedTrustlevel implement
if(element instanceof SecConnectorEntry) { if(element instanceof SecConnectorEntry) {
newComponent = true;
if(((SecConnectorEntry) element).isEncrypted()) { if(((SecConnectorEntry) element).isEncrypted()) {
encrypted = true; encrypted = true;
} }
...@@ -118,11 +121,12 @@ public class EncryptedPathEndInLowTrustlevel extends DerivedTrustlevel implement ...@@ -118,11 +121,12 @@ public class EncryptedPathEndInLowTrustlevel extends DerivedTrustlevel implement
} }
//Save subcomponent for trustlevel //Save subcomponent for trustlevel
if(element instanceof SecComponentEntry) { if(element instanceof SecComponentEntry && newComponent) {
lastComponent = ((SecComponentEntry) element); lastComponent = ((SecComponentEntry) element);
newComponent = false;
} }
//New path starts //New path starts or next iteration for breath first search starting with other elements
if(element.equals(entry) || !iterator.hasNext()) { if(element.equals(entry) || !iterator.hasNext()) {
//Check if info is needed //Check if info is needed
if(!path.isEmpty()) { if(!path.isEmpty()) {
...@@ -131,7 +135,7 @@ public class EncryptedPathEndInLowTrustlevel extends DerivedTrustlevel implement ...@@ -131,7 +135,7 @@ public class EncryptedPathEndInLowTrustlevel extends DerivedTrustlevel implement
trustlevel = "-2"; trustlevel = "-2";
trustlevelCompare = -1; trustlevelCompare = -1;
//component has a trustlevel //component has a trustlevel
if(lastComponent.getTrustlevel().isPresent()) { if(lastComponent != null && lastComponent.getTrustlevel().isPresent()) {
trustlevel = CoCoHelper.getTrustlevelAsString(lastComponent); trustlevel = CoCoHelper.getTrustlevelAsString(lastComponent);
trustlevelCompare = CoCoHelper.getTrustlevelAsInteger(lastComponent); trustlevelCompare = CoCoHelper.getTrustlevelAsInteger(lastComponent);
...@@ -139,10 +143,10 @@ public class EncryptedPathEndInLowTrustlevel extends DerivedTrustlevel implement ...@@ -139,10 +143,10 @@ public class EncryptedPathEndInLowTrustlevel extends DerivedTrustlevel implement
//Trustlevel of supercomponent //Trustlevel of supercomponent
superComponentEntry = getDerivedTrustlevel((ASTArcComponent) lastComponent.getBestKnownVersion().getNode()); superComponentEntry = getDerivedTrustlevel((ASTArcComponent) lastComponent.getBestKnownVersion().getNode());
//If no trustlevel in supercomponent exists, take the default trustlevel of the environment //If no trustlevel in supercomponent exists, take the default trustlevel of the environment
if(superComponentEntry.getTrustlevel().get() == null) { if(superComponentEntry != null && superComponentEntry.getTrustlevel().isPresent()) {
trustlevelSuperComponentCompare = -1;
} else {
trustlevelSuperComponentCompare = CoCoHelper.getTrustlevelAsInteger(superComponentEntry); trustlevelSuperComponentCompare = CoCoHelper.getTrustlevelAsInteger(superComponentEntry);
} else {
trustlevelSuperComponentCompare = -1;
} }
} else { } else {
...@@ -194,7 +198,7 @@ public class EncryptedPathEndInLowTrustlevel extends DerivedTrustlevel implement ...@@ -194,7 +198,7 @@ public class EncryptedPathEndInLowTrustlevel extends DerivedTrustlevel implement
* @param node * @param node
*/ */
private void printWarningMessage(List<SecConnectorEntry> path, String trustlevel, ASTNode node) { private void printWarningMessage(List<SecConnectorEntry> path, String trustlevel, ASTNode node) {
StringBuilder builder = new StringBuilder("The following path ends in the low trustlevel " + trustlevel + ": " + path.get(0)); StringBuilder builder = new StringBuilder("The following encrypted path ends in the low trustlevel " + trustlevel + ": " + path.get(0));
path.remove(0); path.remove(0);
for(SecConnectorEntry pathElement : path) { for(SecConnectorEntry pathElement : path) {
builder.append(" -> "); builder.append(" -> ");
......
...@@ -73,7 +73,7 @@ public class TaintTracking extends Analysis implements ISecAnalysisConnectorChec ...@@ -73,7 +73,7 @@ public class TaintTracking extends Analysis implements ISecAnalysisConnectorChec
protected int innerCheck(ASTNode node, ASTArcComponent nodeParent, SecConnectorEntry entry, ArchitectureGraph graph) throws AmbigousException { protected int innerCheck(ASTNode node, ASTArcComponent nodeParent, SecConnectorEntry entry, ArchitectureGraph graph) throws AmbigousException {
if(checkForTrustlevelRelation(nodeParent, entry)) { if(!checkForTrustlevelRelation(nodeParent, entry)) {
return 0; return 0;
} }
...@@ -85,7 +85,7 @@ public class TaintTracking extends Analysis implements ISecAnalysisConnectorChec ...@@ -85,7 +85,7 @@ public class TaintTracking extends Analysis implements ISecAnalysisConnectorChec
STEntry element = null; STEntry element = null;
StringBuilder sBuilder = new StringBuilder("Taint tracking: The trustlevel becomes higher with this transition " + entry + ". Before the input is used, it must be filtered. The following pass is used: " + entry); StringBuilder sBuilder = new StringBuilder("Taint tracking: The trustlevel becomes higher with the transition " + entry + ". Before the input is used, it must be filtered. The following pass is used: '" + entry);
//Already used //Already used
iterator.next(); iterator.next();
...@@ -102,12 +102,12 @@ public class TaintTracking extends Analysis implements ISecAnalysisConnectorChec ...@@ -102,12 +102,12 @@ public class TaintTracking extends Analysis implements ISecAnalysisConnectorChec
} }
if(element instanceof FilterEntry) { if(element instanceof FilterEntry) {
sBuilder.append(element.getName() + "*"); sBuilder.append(" " + element.getName() + "*");
} }
} }
sBuilder.append(" The filter is marked with a *. If the filter is missing, the input cannot be used."); sBuilder.append("'. The filter is marked with a *. If the filter is missing, the input cannot be used.");
addReport(sBuilder.toString(), node.get_SourcePositionStart()); addReport(sBuilder.toString(), node.get_SourcePositionStart());
return factor; return factor;
...@@ -140,6 +140,10 @@ public class TaintTracking extends Analysis implements ISecAnalysisConnectorChec ...@@ -140,6 +140,10 @@ public class TaintTracking extends Analysis implements ISecAnalysisConnectorChec
} else { } else {
sourceComp = parentComp; sourceComp = parentComp;
} }
if(sourceComp == null) {
return false;
}
// Component target // Component target
String targetRef = entry.getTarget(); String targetRef = entry.getTarget();
...@@ -170,6 +174,10 @@ public class TaintTracking extends Analysis implements ISecAnalysisConnectorChec ...@@ -170,6 +174,10 @@ public class TaintTracking extends Analysis implements ISecAnalysisConnectorChec
} }
} }
if(targetComp == null) {
return false;
}
if(targetComp.getTrustlevel().isPresent()) { if(targetComp.getTrustlevel().isPresent()) {
targetTrustlevel = CoCoHelper.getTrustlevelAsInteger(targetComp); targetTrustlevel = CoCoHelper.getTrustlevelAsInteger(targetComp);
} else { } else {
...@@ -180,11 +188,11 @@ public class TaintTracking extends Analysis implements ISecAnalysisConnectorChec ...@@ -180,11 +188,11 @@ public class TaintTracking extends Analysis implements ISecAnalysisConnectorChec
} }
//If the trustlevel is the lower, the input do not need to be checked again //If the trustlevel is the lower, the input do not need to be checked again
//if the trustlevel ist the same, then check it for the transition before //if the trustlevel is the same, then check it for the transition before
if(sourceTrustlevel > targetTrustlevel) { if(sourceTrustlevel < targetTrustlevel) {
return false;
} else {
return true; return true;
} else {
return false;
} }
} }
......
...@@ -174,13 +174,13 @@ public class TrustlevelConnectorHigherThanEnvironment extends DerivedTrustlevel ...@@ -174,13 +174,13 @@ public class TrustlevelConnectorHigherThanEnvironment extends DerivedTrustlevel
//Compare Trustlevel //Compare Trustlevel
if(trustlevelSource < trustlevelParent && trustlevelTarget < trustlevelParent) { if(trustlevelSource < trustlevelParent && trustlevelTarget < trustlevelParent) {
addReport("The trustlevel of the source and target component is lower than the trustlevel of the environment.", node.get_SourcePositionStart()); addReport("The trustlevel of the source and target component of connector " + entry + " is lower than the trustlevel of the environment.", node.get_SourcePositionStart());
return factor; return factor;
} else if(trustlevelSource >= trustlevelParent && trustlevelTarget < trustlevelParent) { } else if(trustlevelSource >= trustlevelParent && trustlevelTarget < trustlevelParent) {
addReport("The trustlevel of the target component is lower than the trustlevel of the environment.", node.get_SourcePositionStart()); addReport("The trustlevel of the target component of connector " + entry + " is lower than the trustlevel of the environment.", node.get_SourcePositionStart());
return factor; return factor;
} else if(trustlevelSource < trustlevelParent && trustlevelTarget >= trustlevelParent) { } else if(trustlevelSource < trustlevelParent && trustlevelTarget >= trustlevelParent) {
addReport("The trustlevel of the source component is lower than the trustlevel of the environment.", node.get_SourcePositionStart()); addReport("The trustlevel of the source component of connector " + entry + " is lower than the trustlevel of the environment.", node.get_SourcePositionStart());
return factor; return factor;
} }
return 0; return 0;
......
...@@ -130,7 +130,7 @@ public class IdentityWithEncryption extends ComponentExistence implements ISecA ...@@ -130,7 +130,7 @@ public class IdentityWithEncryption extends ComponentExistence implements ISecA
} }
if(!pathfound) { if(!pathfound) {
addReport("There is an identity link between the component " + entry.getSource() + " and " + entry.getTarget() + ", but an encrypted connection is missing.", node.get_SourcePositionStart()); addReport("There is an identity link between the components " + entry.getSource() + " and " + entry.getTarget() + ", but an encrypted connection is missing.", node.get_SourcePositionStart());
return factor; return factor;
} }
return 0; return 0;
......
...@@ -7,6 +7,7 @@ import com.google.common.base.Optional; ...@@ -7,6 +7,7 @@ import com.google.common.base.Optional;
import mc.IErrorCode; import mc.IErrorCode;
import mc.umlp.arcd._ast.ASTArcComponent; import mc.umlp.arcd._ast.ASTArcComponent;
import mc.umlp.arcd.ets.entries.ComponentEntry; import mc.umlp.arcd.ets.entries.ComponentEntry;
import mc.umlp.arcd.ets.entries.SubComponentEntry;
import secarc.error.MontiSecArcAnalysisErrorCodes; import secarc.error.MontiSecArcAnalysisErrorCodes;
import secarc.ets.analysis.checker.Analysis; import secarc.ets.analysis.checker.Analysis;
import secarc.ets.analysis.checker.ISecAnalysisComponentChecker; import secarc.ets.analysis.checker.ISecAnalysisComponentChecker;
...@@ -47,11 +48,12 @@ ISecAnalysisComponentChecker{ ...@@ -47,11 +48,12 @@ ISecAnalysisComponentChecker{
@Override @Override
public int check(ASTArcComponent node, SecComponentEntry entry, boolean advanced) { public int check(ASTArcComponent node, SecComponentEntry entry, boolean advanced) {
//Check trustlevel for all innercomponents //Check trustlevel for all innercomponents
List<SubComponentEntry> subComponents = entry.getSubComponents();
List<ComponentEntry> innerComponents = entry.getInnerComponents(); List<ComponentEntry> innerComponents = entry.getInnerComponents();
Optional<TrustlevelEntry> trustlevelEntry = entry.getTrustlevel(); Optional<TrustlevelEntry> trustlevelEntry = entry.getTrustlevel();
//if no trustlevel and no innercomponents, nothing to check //if no trustlevel and no innercomponents, nothing to check
if(innerComponents != null && trustlevelEntry.isPresent()) { if((subComponents != null || innerComponents != null) && trustlevelEntry.isPresent()) {
int valueTrustlevel = trustlevelEntry.get().getValue(); int valueTrustlevel = trustlevelEntry.get().getValue();
int innerTrustlevel = -2; int innerTrustlevel = -2;
...@@ -60,6 +62,10 @@ ISecAnalysisComponentChecker{ ...@@ -60,6 +62,10 @@ ISecAnalysisComponentChecker{
valueTrustlevel *= -1; valueTrustlevel *= -1;
} }
for(SubComponentEntry innerComponent : subComponents) {
innerComponents.add(innerComponent.getComponentType());
}
//Check difference for every innercomponent //Check difference for every innercomponent
for(ComponentEntry innerComponent : innerComponents) { for(ComponentEntry innerComponent : innerComponents) {
...@@ -80,14 +86,22 @@ ISecAnalysisComponentChecker{ ...@@ -80,14 +86,22 @@ ISecAnalysisComponentChecker{
if((valueTrustlevel>=0 && innerTrustlevel>=0) || (valueTrustlevel<0 && innerTrustlevel<0)) { if((valueTrustlevel>=0 && innerTrustlevel>=0) || (valueTrustlevel<0 && innerTrustlevel<0)) {
if(Math.abs(valueTrustlevel - innerTrustlevel) > 2 && innerTrustlevelEntry.get().getReason() == null) { if(Math.abs(valueTrustlevel - innerTrustlevel) > 2 && innerTrustlevelEntry.get().getReason() == null) {
addReport(message, innerComponent.getNode().get_SourcePositionStart()); if(innerComponent.getNode() != null) {
addReport(message, innerComponent.getNode().get_SourcePositionStart());
} else {
addReport(message, node.get_SourcePositionStart());
}
return factor; return factor;
} }
} else { } else {
if((Math.abs(valueTrustlevel) + Math.abs(innerTrustlevel)) > 2 && innerTrustlevelEntry.get().getReason() == null) { if((Math.abs(valueTrustlevel) + Math.abs(innerTrustlevel)) > 2 && innerTrustlevelEntry.get().getReason() == null) {
addReport(message, innerComponent.getNode().get_SourcePositionStart()); if(innerComponent.getNode() != null) {
addReport(message, innerComponent.getNode().get_SourcePositionStart());
} else {
addReport(message, innerComponent.getNode().get_SourcePositionStart());
}
return factor; return factor;
} }
......
...@@ -61,7 +61,7 @@ public class TrustlevelForTrustlevelRelation extends ComponentExistence implemen ...@@ -61,7 +61,7 @@ public class TrustlevelForTrustlevelRelation extends ComponentExistence implemen
} }
if(!((SecComponentEntry) lowerTrustlevelComoponent.getComponentType()).getTrustlevel().isPresent() || !((SecComponentEntry) higherTrustlevelComoponent.getComponentType()).getTrustlevel().isPresent()) { if(!((SecComponentEntry) lowerTrustlevelComoponent.getComponentType()).getTrustlevel().isPresent() || !((SecComponentEntry) higherTrustlevelComoponent.getComponentType()).getTrustlevel().isPresent()) {
addReport("A trustlevel relation is defined between the components " + lowerTrustlevelComoponent.getName() + " and " + higherTrustlevelComoponent.getName() + ". Therefore a trustlevel should be defined for both.", node.get_SourcePositionStart()); addReport("A trustlevelrelation is defined between the components " + lowerTrustlevelComoponent.getName() + " and " + higherTrustlevelComoponent.getName() + ". Therefore a trustlevel should be defined for both.", node.get_SourcePositionStart());
return factor; return factor;
} }
return 0; return 0;
......
...@@ -139,7 +139,7 @@ public final class MontiSecArcAnalysisConstants { ...@@ -139,7 +139,7 @@ public final class MontiSecArcAnalysisConstants {
public static final String T01 = "T01-Reason-Trustlevel"; public static final String T01 = "T01-Reason-Trustlevel";
public static final String T02 = "T02-High-Trustlevel"; public static final String T02 = "T02-Relation-Trustlevel";
public static final String WI01 = "WI01-Access-Roles"; public static final String WI01 = "WI01-Access-Roles";
......
package secarc.ets.check; package secarc.ets.check;
import interfaces2.coco.ContextCondition; import interfaces2.coco.ContextCondition;
import interfaces2.helper.EntryLoadingErrorException;
import interfaces2.resolvers.AmbigousException; import interfaces2.resolvers.AmbigousException;
import interfaces2.workflows.CheckWorkflowClient; import interfaces2.workflows.CheckWorkflowClient;
...@@ -324,7 +325,7 @@ public class MontiSecArcAnalysisVisitor extends CheckWorkflowClient { ...@@ -324,7 +325,7 @@ public class MontiSecArcAnalysisVisitor extends CheckWorkflowClient {
metricSum += cc.check(node, entry, advanced); metricSum += cc.check(node, entry, advanced);
} }
} }
} catch (AmbigousException e) { } catch (AmbigousException | EntryLoadingErrorException e) {
// not checked here // not checked here
MCG.getLogger().info(e.getMessage()); MCG.getLogger().info(e.getMessage());
} }
......
...@@ -16,10 +16,8 @@ import mc.DSLWorkflow; ...@@ -16,10 +16,8 @@ import mc.DSLWorkflow;
import mc.ProblemReport; import mc.ProblemReport;
import mc.ast.ASTNode; import mc.ast.ASTNode;
import mc.ast.IVisitor; import mc.ast.IVisitor;
import mc.ast.InheritanceVisitor;
import mc.ast.MultiInheritanceVisitor; import mc.ast.MultiInheritanceVisitor;
import secarc._tool.MontiSecArcRoot; import secarc._tool.MontiSecArcRoot;
import secarc.ets.check.MontiSecArcAnalysisVisitor;
public class PreAnalysisTrustlevelTransformationWorkflow<T extends MontiSecArcRoot> extends DSLWorkflow<T> { public class PreAnalysisTrustlevelTransformationWorkflow<T extends MontiSecArcRoot> extends DSLWorkflow<T> {
......
...@@ -20,11 +20,38 @@ public class MontiSecArcAnalysisRunningExampleTest extends TestWithSymtabAnalysi ...@@ -20,11 +20,38 @@ public class MontiSecArcAnalysisRunningExampleTest extends TestWithSymtabAnalysi
*/ */
@Test @Test
public void testSecRunningExample() throws CircluarDependencyException, AmbigousException { public void testSecRunningExample() throws CircluarDependencyException, AmbigousException {
MontiSecArcAnalysisTestTool tool = createTestToolWithAdditionalParameters(new String[] {"src/test/resources/secarc/seccds"}, new String[] {"src/test/resources"}); MontiSecArcAnalysisTestTool tool = createTestToolWithAdditionalParameters(new String[] {"src/test/resources/secarc/seccds/"}, new String[] {"src/test/resources"});
tool.init();
assertTrue(tool.run());
}
/**
* Test only path for Running Example in MontiSecArc with Analysis
* @throws AmbigousException
* @throws CircluarDependencyException
*/
@Test
public void testSecRunningExamplePath() throws CircluarDependencyException, AmbigousException {
MontiSecArcAnalysisTestTool tool = createTestToolWithAdditionalParameters(new String[] {"src/test/resources/secarc/seccdsE/CashDeskSystem.secarc"}, new String[] {"src/test/resources"});
tool.init(); tool.init();
assertTrue(tool.run()); assertTrue(tool.run());
} }
/**
* Test only filter for Running Example in MontiSecArc with Analysis
* @throws AmbigousException
* @throws CircluarDependencyException
*/
@Test
public void testSecRunningExampleFilter() throws CircluarDependencyException, AmbigousException {
MontiSecArcAnalysisTestTool tool = createTestToolWithAdditionalParameters(new String[] {"src/test/resources/secarc/seccdsF/CashDeskSystem.secarc"}, new String[] {"src/test/resources"});
tool.init();
assertTrue(tool.run());
}
} }
...@@ -48,7 +48,7 @@ public class MontiSecArcAnalysisTest extends TestWithSymtabAnalysis<MontiSecArcA ...@@ -48,7 +48,7 @@ public class MontiSecArcAnalysisTest extends TestWithSymtabAnalysis<MontiSecArcA
errorCodes.add(MontiSecArcAnalysisErrorCodes.EncryptedPathEndInLowTrustlevel); errorCodes.add(MontiSecArcAnalysisErrorCodes.EncryptedPathEndInLowTrustlevel);
errorCodes.add(MontiSecArcAnalysisErrorCodes.ListThirdPartyComponents); errorCodes.add(MontiSecArcAnalysisErrorCodes.ListThirdPartyComponents);
assertEquals(5, handler.getWarnings().size()); assertEquals(4, handler.getWarnings().size());
for(ProblemReport error : handler.getErrors()) { for(ProblemReport error : handler.getErrors()) {
assertTrue(errorCodes.contains(error.getErrorcode())); assertTrue(errorCodes.contains(error.getErrorcode()));
} }
...@@ -74,7 +74,7 @@ public class MontiSecArcAnalysisTest extends TestWithSymtabAnalysis<MontiSecArcA ...@@ -74,7 +74,7 @@ public class MontiSecArcAnalysisTest extends TestWithSymtabAnalysis<MontiSecArcA
tool.init(); tool.init();
assertTrue(tool.run()); assertTrue(tool.run());
assertEquals(6, handler.getWarnings().size()); assertEquals(8, handler.getWarnings().size());
for(ProblemReport error : handler.getErrors()) { for(ProblemReport error : handler.getErrors()) {
assertTrue(errorCodes.contains(error.getErrorcode())); assertTrue(errorCodes.contains(error.getErrorcode()));
} }
...@@ -110,7 +110,7 @@ public class MontiSecArcAnalysisTest extends TestWithSymtabAnalysis<MontiSecArcA ...@@ -110,7 +110,7 @@ public class MontiSecArcAnalysisTest extends TestWithSymtabAnalysis<MontiSecArcA
errorCodes.add(MontiSecArcAnalysisErrorCodes.UnencryptedConnectorThroughLowTrustlevel); errorCodes.add(MontiSecArcAnalysisErrorCodes.UnencryptedConnectorThroughLowTrustlevel);
errorCodes.add(MontiSecArcAnalysisErrorCodes.FilterWithHigherTrust); errorCodes.add(MontiSecArcAnalysisErrorCodes.FilterWithHigherTrust);
assertEquals(4, handler.getWarnings().size()); assertEquals(3, handler.getWarnings().size());
for(ProblemReport error : handler.getErrors()) { for(ProblemReport error : handler.getErrors()) {
assertTrue(errorCodes.contains(error.getErrorcode())); assertTrue(errorCodes.contains(error.getErrorcode()));
} }
...@@ -123,7 +123,7 @@ public class MontiSecArcAnalysisTest extends TestWithSymtabAnalysis<MontiSecArcA ...@@ -123,7 +123,7 @@ public class MontiSecArcAnalysisTest extends TestWithSymtabAnalysis<MontiSecArcA
tool.init();