This repository has been archived on 2021-02-18. You can view files and clone it, but cannot push or open issues or pull requests.
chess/src/test/java/dev/kske/chess/pgn/PGNDatabaseTest.java

34 lines
917 B
Java
Raw Normal View History

2019-10-21 21:45:38 +02:00
package dev.kske.chess.pgn;
import java.io.File;
import java.io.FileNotFoundException;
import org.junit.jupiter.api.Test;
import dev.kske.chess.exception.ChessException;
/**
* Project: <strong>Chess</strong><br>
* File: <strong>PGNDatabaseTest.java</strong><br>
* Created: <strong>4 Oct 2019</strong><br>
* Author: <strong>Kai S. K. Engelbart</strong>
*/
class PGNDatabaseTest {
/**
* Test method for
* {@link dev.kske.chess.pgn.PGNDatabase#load(java.io.File)}.
2020-01-19 22:12:33 +01:00
*
* @throws ChessException if an error occurs while parsing the file
* @throws FileNotFoundException if the test file {@code test.pgn} is not
* present
2019-10-21 21:45:38 +02:00
*/
@Test
2020-01-19 22:12:33 +01:00
void testLoad() throws FileNotFoundException, ChessException {
2019-10-21 21:45:38 +02:00
PGNDatabase db = new PGNDatabase();
db.load(
new File(getClass().getClassLoader().getResource("test.pgn").getFile())
);
2019-10-21 21:45:38 +02:00
}
}