use of net.praqma.jenkins.memorymap.parser.MemoryMapMapParserDelegate in project memory-map-plugin by Praqma.
the class MemoryMapParserDelegateTest method testFileNotFoundWithNullPattern.
@Test(expected = MemoryMapFileNotFoundError.class)
public void testFileNotFoundWithNullPattern() throws IOException {
File filePath = new File(file.getAbsolutePath().substring(0, file.getAbsolutePath().lastIndexOf(File.separator)));
MemoryMapMapParserDelegate delegate = new MemoryMapMapParserDelegate();
delegate.findFile(filePath, null);
}
use of net.praqma.jenkins.memorymap.parser.MemoryMapMapParserDelegate in project memory-map-plugin by Praqma.
the class MemoryMapParserDelegateTest method testFileNotFoundWithBlankPattern.
@Test(expected = MemoryMapFileNotFoundError.class)
public void testFileNotFoundWithBlankPattern() throws IOException {
File filePath = new File(file.getAbsolutePath().substring(0, file.getAbsolutePath().lastIndexOf(File.separator)));
MemoryMapMapParserDelegate delegate = new MemoryMapMapParserDelegate();
delegate.findFile(filePath, " ");
}
use of net.praqma.jenkins.memorymap.parser.MemoryMapMapParserDelegate in project memory-map-plugin by Praqma.
the class MemoryMapParserDelegateTest method testFileFound.
@Test
public void testFileFound() throws IOException {
File filePath = new File(file.getAbsolutePath().substring(0, file.getAbsolutePath().lastIndexOf(File.separator)));
MemoryMapMapParserDelegate delegate = new MemoryMapMapParserDelegate();
delegate.findFile(filePath, file.getName());
}
use of net.praqma.jenkins.memorymap.parser.MemoryMapMapParserDelegate in project memory-map-plugin by Praqma.
the class MemoryMapParserDelegateTest method findFilePatternWorks_test.
@Test
public void findFilePatternWorks_test() throws IOException {
MemoryMapMapParserDelegate delegate = new MemoryMapMapParserDelegate();
MemoryMapGraphConfiguration gc = new MemoryMapGraphConfiguration(null, null);
gc.setGraphDataList("CODE,DATA,CONST");
gc.setGraphCaption("Config Memory Graph");
List<MemoryMapGraphConfiguration> graphConfig = Collections.singletonList(gc);
AbstractMemoryMapParser parser = new TexasInstrumentsMemoryMapParser("TI", "TexasInstrumentsMapFile.txt", "28069_RAM_lnk.cmd", 16, graphConfig, Boolean.TRUE);
List<AbstractMemoryMapParser> parsers = Collections.singletonList(parser);
delegate.setParsers(parsers);
assertNotNull(delegate.getParsers());
assertNotNull(parser.getMapFile());
File test = new File(file.getAbsolutePath().substring(0, file.getAbsolutePath().lastIndexOf(File.separator)));
assertTrue(test.isDirectory());
try {
delegate.findFile(test, "*.map");
} catch (Exception ex) {
fail("Parser did not find the file" + ex);
}
}
Aggregations