/** * */ package it.univr.di.cstnu.graph; import org.junit.Test; import org.xml.sax.SAXException; import javax.xml.parsers.ParserConfigurationException; import java.io.File; import java.io.IOException; import static org.junit.Assert.assertEquals; /** * @author posenato */ public class TNGraphTest { /** * */ static File fileSTNU = new File("src/test/resources/dc_500nodes_050ctgs_5lanes_001_SQRT_CTG_DENSE.stnu"); /** * */ TNGraphMLReader readerSTNU; /** * */ TNGraph stnu; /** * Check the method getEdgeCount() * * @throws IOException if any error * @throws ParserConfigurationException if any error * @throws SAXException if any error. */ @Test public void testSTNUGetEdgeCount() throws Exception { this.readerSTNU = new TNGraphMLReader<>(); this.stnu = this.readerSTNU.readGraph(fileSTNU, STNUEdgeInt.class); assertEquals(2254, this.stnu.getEdgeCount()); } }