boolean result = true ;
boolean ok = true;
log.println("test document with wrong extension");
log.println("the document '" + docURL + "' is not what it seems to be ;-)");
PropertyValue[][] mediaDescr = new PropertyValue[1][1];
mediaDescr[0][0] = new PropertyValue();
mediaDescr[0][0].Name = "URL";
mediaDescr[0][0].Value = docURL;
String type = oObj.queryTypeByDescriptor(mediaDescr, false);
ok = type.indexOf("writer") > -1;
result &= ok;
log.println("flat detection should detect a writer and has detected '"+ type +"': " + ok);
type = oObj.queryTypeByDescriptor(mediaDescr, true);
ok = type.indexOf("calc") > -1;
result &= ok;
log.println("deep detection should detect a calc and has detected '"+ type +"': " + ok);
log.println("test dokument with bookmark: " + bookmarkURL);
mediaDescr = new PropertyValue[1][1];
mediaDescr[0][0] = new PropertyValue();
mediaDescr[0][0].Name = "URL";
mediaDescr[0][0].Value = bookmarkURL;
type = oObj.queryTypeByDescriptor(mediaDescr, true);
ok = type.indexOf("writer") > -1;
result &= ok;