Skip to content

Commit

Permalink
tests pass
Browse files Browse the repository at this point in the history
  • Loading branch information
benjymin authored and BenKenobie31415 committed Mar 10, 2024
1 parent 4008b19 commit b4e72eb
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/test/java/org/gecko/model/ElementTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;

import org.gecko.exceptions.MissingViewModelElementException;
import org.gecko.exceptions.ModelException;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
Expand All @@ -16,8 +17,16 @@ public class ElementTest {
@BeforeAll
static void setUp() {
assertThrows(ModelException.class, () -> element = new Element(-1) {
@Override
public void accept(ElementVisitor visitor) throws ModelException, MissingViewModelElementException {

}
});
assertDoesNotThrow(() -> element = new Element(0) {
@Override
public void accept(ElementVisitor visitor) throws ModelException, MissingViewModelElementException {

}
});
}

Expand All @@ -32,8 +41,16 @@ void testEquals() {

final Element[] other = new Element[4];
assertDoesNotThrow(() -> other[0] = new Element(1) {
@Override
public void accept(ElementVisitor visitor) throws ModelException, MissingViewModelElementException {

}
});
assertDoesNotThrow(() -> other[1] = new Element(0) {
@Override
public void accept(ElementVisitor visitor) throws ModelException, MissingViewModelElementException {

}
});

assertDoesNotThrow(() -> other[2] = new State(2, "state"));
Expand Down

0 comments on commit b4e72eb

Please sign in to comment.