This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
sp-03/test/ch/usi/inf/sp/cfg/EdgeTest.java
github-classroom[bot] 61202b8db3
Initial commit
2023-10-09 07:08:58 +00:00

34 lines
No EOL
635 B
Java

package ch.usi.inf.sp.cfg;
import org.junit.jupiter.api.Test;
import static org.junit.jupiter.api.Assertions.*;
class EdgeTest {
@Test
void newEdge() {
Edge e = new Edge();
assertNull(e.getFrom());
assertNull(e.getTo());
}
@Test
void setFrom() {
Edge e = new Edge();
Node n = new Node();
e.setFrom(n);
assertEquals(n, e.getFrom());
assertNull(e.getTo());
}
@Test
void setTo() {
Edge e = new Edge();
Node n = new Node();
e.setTo(n);
assertEquals(n, e.getTo());
assertNull(e.getFrom());
}
}