ExportOptions implements OptionsBean { public boolean includeBlobs() { return serializeBlobContent.value(options); } ExportOptions(OptionParser parser); @Override void configure(OptionSet options); @Override String title(); @Override String description(); @Override int order(); @Override Set<String> operationNames(); File getFilterFile(); File getOutDir(); String getFilter(); String getPath(); NodeStateSerializer.Format getFormat(); boolean includeBlobs(); boolean isPrettyPrint(); int getDepth(); int getMaxChildNodes(); static final OptionsBeanFactory FACTORY; }
@Test public void booleanOptionsProps() throws Exception{ options.parseAndConfigure(parser, new String[] {"-b"}); ExportOptions opts = options.getOptionBean(ExportOptions.class); assertFalse(opts.includeBlobs()); reset(); options.parseAndConfigure(parser, new String[] {"--blobs=true"}); opts = options.getOptionBean(ExportOptions.class); assertTrue(opts.includeBlobs()); reset(); options.parseAndConfigure(parser, new String[] {"--depth=3"}); opts = options.getOptionBean(ExportOptions.class); assertFalse(opts.includeBlobs()); }