/** * <p>tempDir</p> * * @param name a {@link java.lang.String} object. * @return a {@link java.io.File} object. * @throws java.io.IOException if any. */ public File tempDir(String name) throws IOException { if (name == null) { throw new IllegalArgumentException("name argument cannot be null"); } return tempDir(m_tempDir, name); }
private File getSnmpRrdDirectory() throws IOException { if (m_snmpDirectory == null) { m_snmpDirectory = m_fileAnticipator.tempDir("snmp"); } return m_snmpDirectory; }
private File getSnmpRrdDirectory() throws IOException { if (m_snmpDirectory == null) { m_snmpDirectory = m_fileAnticipator.tempDir("snmp"); } return m_snmpDirectory; } }
private File getSnmpRrdDirectory() throws IOException { if (m_snmpDirectory == null) { m_snmpDirectory = m_fileAnticipator.tempDir("snmp"); } return m_snmpDirectory; } }
private File getSnmpRrdDirectory() throws IOException { if (snmpDirectory == null) { snmpDirectory = fileAnticipator.tempDir("snmp"); } return snmpDirectory; } }
m_snmpRrdDirectory = m_fileAnticipator.tempDir("snmp"); m_snmpRrdDirectory.mkdirs(); testContext.setAttribute("fileAnticipator", m_fileAnticipator);
m_snmpRrdDirectory = m_fileAnticipator.tempDir("snmp"); m_snmpRrdDirectory.mkdirs(); testContext.setAttribute("fileAnticipator", m_fileAnticipator);
@Test public void testPersistStringAttributeWithExistingPropertiesFile() throws Exception { initPersister(); File nodeDir = m_fileAnticipator.tempDir(getSnmpRrdDirectory(), m_node.getId().toString()); m_fileAnticipator.tempFile(nodeDir, RrdResourceAttributeUtils.STRINGS_PROPERTIES_FILE_NAME, "#just a test"); CollectionAttribute attribute = buildStringAttribute(); m_persister.persistStringAttribute(attribute); }
@Test public void testPersistStringAttributeWithParentDirectory() throws Exception { initPersister(); File nodeDir = m_fileAnticipator.tempDir(getSnmpRrdDirectory(), m_node.getId().toString()); m_fileAnticipator.expecting(nodeDir, RrdResourceAttributeUtils.STRINGS_PROPERTIES_FILE_NAME); CollectionAttribute attribute = buildStringAttribute(); m_persister.persistStringAttribute(attribute); }