@Test public void testHasStatusDeleted() throws Exception { ETLStatistics etlStatistics = new ETLStatistics(); boolean hasStatus = false; CrsSpecimenTransformer crsSpecimenTransformer = new CrsSpecimenTransformer(etlStatistics); CrsExtractor extractor = new CrsExtractor(specimenFile, etlStatistics); for (XMLRecordInfo extracted : extractor) { CommonReflectionUtil.setField(AbstractTransformer.class, crsSpecimenTransformer, "objectID", "RMNH.MAM.TT.5"); CommonReflectionUtil.setField(AbstractTransformer.class, crsSpecimenTransformer, "input", extracted); Object returned = CommonReflectionUtil.callMethod(null, null, crsSpecimenTransformer, "hasStatusDeleted"); hasStatus = (boolean) returned; } assertFalse(hasStatus); }
private boolean hasStatusDeleted() { Element hdr = DOMUtil.getChild(input.getRecord(), "header"); if (hdr == null || !hdr.hasAttribute("status")) return false; return hdr.getAttribute("status").equals("deleted"); }
CrsSpecimenTransformer extends AbstractXMLTransformer<Specimen> { private boolean hasStatusDeleted() { Element hdr = DOMUtil.getChild(input.getRecord(), "header"); if (hdr == null || !hdr.hasAttribute("status")) return false; return hdr.getAttribute("status").equals("deleted"); } }
CrsSpecimenTransformer extends AbstractXMLTransformer<Specimen> { private boolean hasStatusDeleted() { Element hdr = DOMUtil.getChild(input.getRecord(), "header"); if (hdr == null || !hdr.hasAttribute("status")) return false; return hdr.getAttribute("status").equals("deleted"); } CrsSpecimenTransformer(ETLStatistics stats); }
CrsSpecimenTransformer extends AbstractXMLTransformer<Specimen> { private boolean hasStatusDeleted() { Element hdr = DOMUtil.getChild(input.getRecord(), "header"); if (hdr == null || !hdr.hasAttribute("status")) return false; return hdr.getAttribute("status").equals("deleted"); } CrsSpecimenTransformer(ETLStatistics stats);  }
CrsSpecimenTransformer extends AbstractXMLTransformer<Specimen> { private boolean hasStatusDeleted() { Element hdr = DOMUtil.getChild(input.getRecord(), "header"); if (hdr == null || !hdr.hasAttribute("status")) return false; return hdr.getAttribute("status").equals("deleted"); } CrsSpecimenTransformer(ETLStatistics stats);   }