34 lines
No EOL
635 B
Java
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());
|
|
}
|
|
|
|
} |