/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; DocumentType docType; NamedNodeMap entitiesMap; Entity entity; String encodingName; doc = (Document) load("hc_staff", false); docType = doc.getDoctype(); entitiesMap = docType.getEntities(); entity = (Entity) entitiesMap.getNamedItem("alpha"); encodingName = entity.getInputEncoding(); assertNull("entitygetinputencoding01", encodingName); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; DocumentType docType; NamedNodeMap entitiesMap; Entity entity; String encodingName; doc = (Document) load("barfoo_utf16", false); docType = doc.getDoctype(); entitiesMap = docType.getEntities(); entity = (Entity) entitiesMap.getNamedItem("ent5"); encodingName = entity.getInputEncoding(); assertNull("entitygetinputencoding02", encodingName); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; DocumentType docType; NamedNodeMap entitiesMap; Entity entity; String encodingName; doc = (Document) load("external_barfoo", false); docType = doc.getDoctype(); entitiesMap = docType.getEntities(); entity = (Entity) entitiesMap.getNamedItem("ent2"); encodingName = entity.getInputEncoding(); assertEqualsIgnoreCase("entityIsUTF8", "UTF-8", encodingName); encodingName = doc.getInputEncoding(); assertEqualsIgnoreCase("documentIsUTF8", "UTF-8", encodingName); } /**
/** * Runs the test case. * @throws Throwable Any uncaught exception causes test to fail */ public void runTest() throws Throwable { Document doc; DocumentType docType; NamedNodeMap entitiesMap; Entity entity; String encodingName; doc = (Document) load("external_barfoo", false); docType = doc.getDoctype(); entitiesMap = docType.getEntities(); entity = (Entity) entitiesMap.getNamedItem("ent1"); encodingName = entity.getInputEncoding(); if (!equalsIgnoreCase("UTF-16LE", encodingName)) { assertEqualsIgnoreCase("entityIsUTF16orUTF16LE", "UTF-16", encodingName); } encodingName = doc.getInputEncoding(); assertEqualsIgnoreCase("documentIsUTF8", "UTF-8", encodingName); } /**