TestEnvManager.java revision ea1068c292e9b341af6d6b563cd8988a96be20a9
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * CDDL HEADER START
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * The contents of this file are subject to the terms of the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Common Development and Distribution License, Version 1.0 only
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * (the "License"). You may not use this file except in compliance
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * with the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * See the License for the specific language governing permissions
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * and limitations under the License.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * When distributing Covered Code, include this CDDL HEADER in each
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * file and include the License file at legal-notices/CDDLv1_0.txt.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * If applicable, add the following below this CDDL HEADER, with the
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * fields enclosed by brackets "[]" replaced with your own identifying
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * information:
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Portions Copyright [yyyy] [name of copyright owner]
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * CDDL HEADER END
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Copyright 2006-2008 Sun Microsystems, Inc.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Portions Copyright 2015 ForgeRock AS
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * EnvManager Tester.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Set up the environment for performing the tests in this suite.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * @throws Exception
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * If the environment could not be set up.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin tempDir = TestCaseUtils.createTemporaryDirectory("jebtest");
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * Tears down the environment for performing the tests in this suite.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin * @throws Exception
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * If the environment could not be finalized.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Test for valid home directory.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * @throws Exception
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * If the test failed unexpectedly.
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin public void testValidHomeDir() throws Exception {
7c2fbfb345896881c631598ee3852ce9ce33fb07April Chin Environment env = new Environment(new File(homeDirName), envConfig);
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * Test for invalid home directory.
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * @throws Exception
da2e3ebdc1edfbc5028edf1354e7dd2fa69a7968chin * If the test failed unexpectedly.