AnalyzerGuruTest.java revision 257
/**
* Tests for the functionality provided by the AnalyzerGuru class.
*/
public class AnalyzerGuruTest {
/**
* Test that we get the correct analyzer if the file name exactly matches a
* known extension.
*/
@Test
public void testFileNameSameAsExtension() throws Exception {
}
@Test
public void testUTF8ByteOrderMark() throws Exception {
'<', '?', 'x', 'm', 'l', ' ',
'v', 'e', 'r', 's', 'i', 'o', 'n', '=',
'"', '1', '.', '0', '"', '?', '>' };
}
@Test
public void addExtension() throws Exception {
// should not find analyzer for this unlikely extension
// should be the same factory as the built-in analyzer for sh scripts
// add an analyzer for the extension and see that it is picked up
assertSame(ShAnalyzerFactory.class,
// remove the mapping and verify that it is gone
}
@Test
public void testZip() throws IOException {
zos.closeEntry();
}
@Test
public void testJar() throws IOException {
jos.closeEntry();
}
@Test
public void testPlainText() throws IOException {
assertSame(PlainAnalyzer.class,
}
}