@Test public void doCompare() { try { Tuple2 actual = Tuple2.fromList(FDBHolderImpl.parseDirString(dirString)); if(expected.size() != actual.size()) { fail(String.format("Tuple size mismatch: [%s] vs [%s]", expected.getItems(), actual.getItems())); } for(int i = 0; i < expected.size(); ++i) { Object e = expected.get(i); Object a = actual.get(i); assertEquals(String.format("tuple(%d)", i), e, a); } } catch(IllegalArgumentException e) { if(dirString != null) { throw e; } } }
static List<String> parseDirString(String dirString) { ArgumentValidation.notNull("dirString", dirString); String normalized = (dirString.trim() + "/").replace("\\", "/").replace(" String[] parts = normalized.split("/"); return Arrays.asList(parts); }
FDBHolderImpl implements FDBHolder, Service { static List<String> parseDirString(String dirString) { ArgumentValidation.notNull("dirString", dirString); String normalized = (dirString.trim() + "/").replace("\\", "/").replace(" String[] parts = normalized.split("/"); return Arrays.asList(parts); } }
FDBHolderImpl implements FDBHolder, Service { static List<String> parseDirString(String dirString) { ArgumentValidation.notNull("dirString", dirString); String normalized = (dirString.trim() + "/").replace("\\", "/").replace(" String[] parts = normalized.split("/"); return Arrays.asList(parts); } @Inject  FDBHolderImpl(ConfigurationService configService); }
FDBHolderImpl implements FDBHolder, Service { static List<String> parseDirString(String dirString) { ArgumentValidation.notNull("dirString", dirString); String normalized = (dirString.trim() + "/").replace("\\", "/").replace(" String[] parts = normalized.split("/"); return Arrays.asList(parts); } @Inject  FDBHolderImpl(ConfigurationService configService); @Override void start(); @Override void stop(); @Override void crash(); @Override int getAPIVersion(); @Override FDB getFDB(); @Override Database getDatabase(); @Override TransactionContext getTransactionContext(); @Override DirectorySubspace getRootDirectory(); }
FDBHolderImpl implements FDBHolder, Service { static List<String> parseDirString(String dirString) { ArgumentValidation.notNull("dirString", dirString); String normalized = (dirString.trim() + "/").replace("\\", "/").replace(" String[] parts = normalized.split("/"); return Arrays.asList(parts); } @Inject  FDBHolderImpl(ConfigurationService configService); @Override void start(); @Override void stop(); @Override void crash(); @Override int getAPIVersion(); @Override FDB getFDB(); @Override Database getDatabase(); @Override TransactionContext getTransactionContext(); @Override DirectorySubspace getRootDirectory();  }