agave-monitors/monitors-core/src/test/java/org/iplantc/service/monitor/AbstractMonitorIT.java
/**
	 * Creates a persists a test monitor.
	 * 
	 * @param isActive
	 * @param isStranger
	 * @param isStorageType
	 * @param isPublicSystem
	 * @throws Exception
	 */
Creates a persists a test monitor.


Creates a persists a test monitor .
protected void addMonitor(boolean isActive, boolean isStranger, boolean isStorageType, boolean isPublicSystem)
	throws Exception
	{
		String owner = isStranger ? SYSTEM_SHARE_USER : TEST_USER;
		RemoteSystem system = null;
		if (isPublicSystem) {
			if (isStorageType) {
				system = publicStorageSystem;
			} else {
				system = publicExecutionSystem;
			}
		} else {
			if (isStorageType) {
				if (isStranger)
					system = sharedStorageSystem;
				else 
					system = privateStorageSystem;
			} else {
				if (isStranger)
					system = sharedExecutionSystem;
				else 
					system = privateExecutionSystem;
			}
		}
		Monitor monitor = new Monitor(system, 5, owner);
		monitor.setActive(isActive);
		dao.persist(monitor);
		Assert.assertNotNull(monitor.getId(), "Failed to save monitor");
	}
protected void addMonitor ( boolean isActive , boolean isStranger , boolean isStorageType , boolean isPublicSystem ) throws Exception { String owner = isStranger ? SYSTEM_SHARE_USER : TEST_USER ; RemoteSystem system = null ; if ( isPublicSystem ) { if ( isStorageType ) { system = publicStorageSystem ; } else { system = publicExecutionSystem ; } } else { if ( isStorageType ) { if ( isStranger ) system = sharedStorageSystem ; else system = privateStorageSystem ; } else { if ( isStranger ) system = sharedExecutionSystem ; else system = privateExecutionSystem ; } } Monitor monitor = new Monitor ( system , 5 , owner ) ; monitor . setActive ( isActive ) ; dao . persist ( monitor ) ; Assert . assertNotNull ( monitor . getId ( ) , "Failed to save monitor" ) ; }
Creates a persists a test monitor.
Creates a persists a test monitor .