MCPcopy Create free account
hub / github.com/PCGen/pcgen / testIsPCGenCharacterFile

Method testIsPCGenCharacterFile

code/src/test/pcgen/io/PCGFileTest.java:22–32  ·  view source on GitHub ↗

Tests PCGFile#isPCGenCharacterFile(File)

()

Source from the content-addressed store, hash-verified

20 * Tests {@link PCGFile#isPCGenCharacterFile(File)}
21 */
22 @Test
23 void testIsPCGenCharacterFile() throws Exception
24 {
25 //file must exist for it to be true
26 assertFalse(PCGFile.isPCGenCharacterFile(new File(
27 Constants.EXTENSION_CHARACTER_FILE)), "Extension without filename");
28 File temp = File.createTempFile("PCT", Constants.EXTENSION_CHARACTER_FILE);
29 temp.deleteOnExit();
30 assertTrue( PCGFile.isPCGenCharacterFile(temp), "File existence");
31 assertTrue( PCGFile.isPCGenCharacterOrPartyFile(temp), "File existence");
32 }
33
34 @Test
35 void testIsPCGenPartyFile() throws Exception

Callers

nothing calls this directly

Calls 2

isPCGenCharacterFileMethod · 0.95

Tested by

no test coverage detected