Skip to content
Snippets Groups Projects
Commit e02c53bf authored by srosse's avatar srosse
Browse files

OO-1879: save the unit test for the confluence helper

parent f525ba91
No related branches found
No related tags found
No related merge requests found
...@@ -118,7 +118,7 @@ public class ConfluenceHelper { ...@@ -118,7 +118,7 @@ public class ConfluenceHelper {
* @param locale * @param locale
* @return * @return
*/ */
private static final String generateSpace(String version, Locale locale) { protected static final String generateSpace(String version, Locale locale) {
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.append("/OO"); sb.append("/OO");
......
/**
* <a href="http://www.openolat.org">
* OpenOLAT - Online Learning and Training</a><br>
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); <br>
* you may not use this file except in compliance with the License.<br>
* You may obtain a copy of the License at the
* <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a>
* <p>
* Unless required by applicable law or agreed to in writing,<br>
* software distributed under the License is distributed on an "AS IS" BASIS, <br>
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br>
* See the License for the specific language governing permissions and <br>
* limitations under the License.
* <p>
* Initial code contributed and copyrighted by<br>
* frentix GmbH, http://www.frentix.com
* <p>
*/
package org.olat.core.commons.services.help;
import java.util.Locale;
import org.junit.Assert;
import org.junit.Test;
/**
*
* Initial date: 07.01.2015<br>
* @author srosse, stephane.rosse@frentix.com, http://www.frentix.com
*
*/
public class ConfluenceHelperTest {
@Test
public void getURL_confluence() {
String url1 = ConfluenceHelper.generateSpace("10.1.1", Locale.GERMAN);
Assert.assertNotNull(url1);
Assert.assertTrue(url1.startsWith("/OO101DE/"));
String url2 = ConfluenceHelper.generateSpace("10.1", Locale.ENGLISH);
Assert.assertNotNull(url2);
Assert.assertTrue(url2.startsWith("/OO101EN/"));
String url3 = ConfluenceHelper.generateSpace("10.1a", Locale.ENGLISH);
Assert.assertNotNull(url3);
Assert.assertTrue(url3.startsWith("/OO101EN/"));
String url4 = ConfluenceHelper.generateSpace("11a", Locale.ENGLISH);
Assert.assertNotNull(url4);
Assert.assertTrue(url4.startsWith("/OO110EN/"));
}
}
...@@ -38,28 +38,6 @@ public class ConfluenceLinkSPITest { ...@@ -38,28 +38,6 @@ public class ConfluenceLinkSPITest {
private static final OLog log = Tracing.createLoggerFor(ConfluenceLinkSPITest.class); private static final OLog log = Tracing.createLoggerFor(ConfluenceLinkSPITest.class);
/*
@Test
public void getURL_confluence() {
ConfluenceLinkSPI linkSPI = new ConfluenceLinkSPI();
String url1 = ConfluenceHelper.generateSpace("10.1.1", Locale.GERMAN);
Assert.assertNotNull(url1);
Assert.assertTrue(url1.startsWith("/OO101DE/"));
String url2 = ConfluenceHelper.generateSpace("10.1", Locale.ENGLISH);
Assert.assertNotNull(url2);
Assert.assertTrue(url2.startsWith("/OO101EN/"));
String url3 = ConfluenceHelper.generateSpace("10.1a", Locale.ENGLISH);
Assert.assertNotNull(url3);
Assert.assertTrue(url3.startsWith("/OO101EN/"));
String url4 = ConfluenceHelper.generateSpace("11a", Locale.ENGLISH);
Assert.assertNotNull(url4);
Assert.assertTrue(url4.startsWith("/OO110EN/"));
}*/
@Test @Test
public void getUrl() { public void getUrl() {
// init settings to set version, required by ConfluenceLinkSPI // init settings to set version, required by ConfluenceLinkSPI
......
...@@ -85,6 +85,7 @@ import org.junit.runners.Suite; ...@@ -85,6 +85,7 @@ import org.junit.runners.Suite;
org.olat.commons.coordinate.cluster.jms.JMSTest.class, org.olat.commons.coordinate.cluster.jms.JMSTest.class,
org.olat.commons.coordinate.cluster.lock.LockTest.class, org.olat.commons.coordinate.cluster.lock.LockTest.class,
org.olat.commons.coordinate.CoordinatorTest.class, org.olat.commons.coordinate.CoordinatorTest.class,
org.olat.core.commons.services.help.ConfluenceHelperTest.class,
org.olat.core.commons.services.help.spi.ConfluenceLinkSPITest.class, org.olat.core.commons.services.help.spi.ConfluenceLinkSPITest.class,
org.olat.core.commons.services.webdav.WebDAVCommandsTest.class, org.olat.core.commons.services.webdav.WebDAVCommandsTest.class,
org.olat.core.commons.services.webdav.manager.DigestAuthenticationTest.class, org.olat.core.commons.services.webdav.manager.DigestAuthenticationTest.class,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment