+ " Cannot be parsed correctly. It should be in"
+ " MM/DD/YYYY HH:MM AM_PM format.", be3.getMessage());
}
s = (DateSelector)getInstance();
Parameter param = new Parameter();
param.setName("garbage in");
param.setValue("garbage out");
Parameter[] params = new Parameter[1];
params[0] = param;
s.setParameters(params);
try {
s.isSelected(basedir,filenames[0],files[0]);
fail("DateSelector did not check for valid parameter element");
} catch (BuildException be4) {
assertEquals("Invalid parameter garbage in", be4.getMessage());
}
s = (DateSelector)getInstance();
param = new Parameter();
param.setName("millis");
param.setValue("garbage out");
params[0] = param;
s.setParameters(params);
try {
s.isSelected(basedir,filenames[0],files[0]);
fail("DateSelector did not check for valid millis parameter");
} catch (BuildException be5) {
assertEquals("Invalid millisecond setting garbage out",
be5.getMessage());
}
s = (DateSelector)getInstance();
param = new Parameter();
param.setName("granularity");
param.setValue("garbage out");
params[0] = param;
s.setParameters(params);
try {
s.isSelected(basedir,filenames[0],files[0]);
fail("DateSelector did not check for valid granularity parameter");