Skip to content

Commit

Permalink
Sonar
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Bui-Quang <[email protected]>
  • Loading branch information
pl-buiquang committed Jan 7, 2020
1 parent 800a52d commit a9b28dd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@

package com.powsybl.afs;

import com.powsybl.commons.PowsyblException;

/**
* @author Paul Bui-Quang <paul.buiquang at rte-france.com>
*/
public class AfsCircularDependencyException extends AfsException {
public AfsCircularDependencyException(String message) {
super(message);
}
public class AfsCircularDependencyException extends PowsyblException {

public AfsCircularDependencyException() {
super("Circular dependency detected");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ public void test() {
.build();
script.addGenericScript(genericScript);

assertEquals(script.readScript(true), "var foo=\"bar\"\n\nvar p0=1\n\nvar pmax=2\n\nlist of things\n\nprintln 'bye'");
contentWithInclude = script.readScript(true);
assertEquals("var foo=\"bar\"\n\nvar p0=1\n\nvar pmax=2\n\nlist of things\n\nprintln 'bye'", contentWithInclude);
assertThatCode(() -> genericScript.addGenericScript(genericScript)).isInstanceOf(AfsCircularDependencyException.class);
}
}

0 comments on commit a9b28dd

Please sign in to comment.