@Test public void testConfigMachineNameInvalidNull() throws Exception { File localDir = new File("/some/folder"); ConfigTO configTO = new ConfigTO(); RepoTO repoTO = new RepoTO(); configTO.setMachineName(null); try { new Config(localDir, configTO, repoTO); fail("Machine name should not have been accepted."); } catch (ConfigException e) { TestAssertUtil.assertErrorStackTraceContains("Machine name", e); } }
public void setMachineName(String machineName) throws ConfigException { if (machineName == null || !VectorClock.MACHINE_PATTERN.matcher(machineName).matches()) { throw new ConfigException("Machine name cannot be empty and must be only characters (A-Z)."); } this.machineName = machineName; }
Config { public void setMachineName(String machineName) throws ConfigException { if (machineName == null || !VectorClock.MACHINE_PATTERN.matcher(machineName).matches()) { throw new ConfigException("Machine name cannot be empty and must be only characters (A-Z)."); } this.machineName = machineName; } }
Config { public void setMachineName(String machineName) throws ConfigException { if (machineName == null || !VectorClock.MACHINE_PATTERN.matcher(machineName).matches()) { throw new ConfigException("Machine name cannot be empty and must be only characters (A-Z)."); } this.machineName = machineName; } Config(File aLocalDir, ConfigTO configTO, RepoTO repoTO); }
Config { public void setMachineName(String machineName) throws ConfigException { if (machineName == null || !VectorClock.MACHINE_PATTERN.matcher(machineName).matches()) { throw new ConfigException("Machine name cannot be empty and must be only characters (A-Z)."); } this.machineName = machineName; } Config(File aLocalDir, ConfigTO configTO, RepoTO repoTO); java.sql.Connection createDatabaseConnection(); java.sql.Connection createDatabaseConnection(boolean readOnly); File getCacheDir(); File getAppDir(); String getMachineName(); void setMachineName(String machineName); String getDisplayName(); void setDisplayName(String displayName); TransferPlugin getTransferPlugin(); TransferSettings getConnection(); void setConnection(TransferSettings connection); byte[] getRepoId(); Chunker getChunker(); Cache getCache(); IgnoredFiles getIgnoredFiles(); MultiChunker getMultiChunker(); Transformer getTransformer(); void setCache(Cache cache); File getLocalDir(); File getDatabaseDir(); File getLogDir(); File getStateDir(); SaltedSecretKey getMasterKey(); File getDatabaseFile(); File getPortFile(); File getTransactionFile(); File getTransactionDatabaseFile(); File getTransactionListFile(); File getTransactionFile(long databaseVersionNumber); File getTransactionDatabaseFile(long databaseVersionNumber); }
Config { public void setMachineName(String machineName) throws ConfigException { if (machineName == null || !VectorClock.MACHINE_PATTERN.matcher(machineName).matches()) { throw new ConfigException("Machine name cannot be empty and must be only characters (A-Z)."); } this.machineName = machineName; } Config(File aLocalDir, ConfigTO configTO, RepoTO repoTO); java.sql.Connection createDatabaseConnection(); java.sql.Connection createDatabaseConnection(boolean readOnly); File getCacheDir(); File getAppDir(); String getMachineName(); void setMachineName(String machineName); String getDisplayName(); void setDisplayName(String displayName); TransferPlugin getTransferPlugin(); TransferSettings getConnection(); void setConnection(TransferSettings connection); byte[] getRepoId(); Chunker getChunker(); Cache getCache(); IgnoredFiles getIgnoredFiles(); MultiChunker getMultiChunker(); Transformer getTransformer(); void setCache(Cache cache); File getLocalDir(); File getDatabaseDir(); File getLogDir(); File getStateDir(); SaltedSecretKey getMasterKey(); File getDatabaseFile(); File getPortFile(); File getTransactionFile(); File getTransactionDatabaseFile(); File getTransactionListFile(); File getTransactionFile(long databaseVersionNumber); File getTransactionDatabaseFile(long databaseVersionNumber); static final String DIR_APPLICATION; static final String DIR_CACHE; static final String DIR_DATABASE; static final String DIR_LOG; static final String DIR_STATE; static final String FILE_IGNORE; static final String FILE_CONFIG; static final String FILE_REPO; static final String FILE_MASTER; static final String FILE_DATABASE; static final String FILE_PORT; static final String FILE_TRANSACTION; static final String FILE_TRANSACTION_DATABASE; static final String FILE_TRANSACTION_PATTERN; static final String FILE_TRANSACTION_DATABASE_PATTERN; static final String FILE_TRANSACTION_LIST; }