/*
* Copyright (C) 2016 Bonitasoft S.A.
* Bonitasoft, 32 rue Gustave Eiffel - 38000 Grenoble
* This library is free software; you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Foundation
* version 2.1 of the License.
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License along with this
* program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
* Floor, Boston, MA 02110-1301, USA.
*/
package org.bonitasoft.console.common.server.preferences.constants;
import static org.assertj.core.api.Assertions.assertThat;
import static org.mockito.Mockito.doReturn;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.Spy;
import org.mockito.runners.MockitoJUnitRunner;
/**
* @author Emmanuel Duchastenier
*/
@RunWith(MockitoJUnitRunner.class)
public class WebBonitaConstantsImplTest {
@Spy
WebBonitaConstantsImpl webBonitaConstants;
@Test
public void getTenantsFolderPath_should_return_tenants_sibling_folder_aside_platform() throws Exception {
doReturn("some/path/to/platform/").when(webBonitaConstants).getTempFolderPath();
final String tenantsFolderPath = webBonitaConstants.getTenantsFolderPath();
assertThat(tenantsFolderPath).isEqualTo("some/path/to/tenants/");
}
}