blob: 6b53881aee7aba62a11107534c170d3fa4e05ea6 [file] [log] [blame]
/**
******************************************************************************
* Copyright © 2017-2018 PTA GmbH.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
*
* http://www.eclipse.org/legal/epl-v10.html
*
******************************************************************************
*/
package org.eclipse.openk.portal.common;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
public class BackendConfigTest {
@Test
public void testConfig() {
BackendConfig bc = BackendConfig.getInstance();
assertEquals( (int)bc.getInternalSessionLengthMillis(), 3600000 );
assertEquals( (int)bc.getReloadUsersInSec(), 300 );
assertEquals( bc.getAuthServerUrl(), "http://entjava002:8080/");
assertEquals( bc.getKeycloakRealm(), "elogbook");
assertEquals( bc.getKeycloakClient(),"elogbook-backend");
assertEquals( bc.getKeycloakAdmin(), "admin");
assertEquals( bc.getKeycloakPW(), "nimda");
assertEquals( BackendConfig.getConfigFileName(), "backendConfigDevLocal.json");
BackendConfig.setConfigFileName("backendConfigProduction.json");
assertEquals( BackendConfig.getConfigFileName(), "backendConfigProduction.json");
}
}