public class RefasterJsScannerTest {
@Test
public void testInitialize_missingTemplates() throws Exception {
try {
Compiler compiler = createCompiler();
compileTestCode(compiler, "", "");
createScanner(compiler, "");
fail("An exception should have been thrown for missing templates.");
} catch (IllegalStateException expected) {}
try {
Compiler compiler = createCompiler();
compileTestCode(compiler, "", "");
createScanner(compiler, "function notATemplate() {}");
fail("An exception should have been thrown for missing templates.");
} catch (IllegalStateException expected) {}
try {
Compiler compiler = createCompiler();
compileTestCode(compiler, "", "");
createScanner(compiler, "function after_foo() {}");
fail("An exception should have been thrown for missing templates.");
} catch (IllegalStateException expected) {}
}