/maven-amps-plugin/src/test/java/com/atlassian/maven/plugins/amps/product/CrowdProductHandlerTest.java
https://bitbucket.org/mmeinhold/amps · Java · 24 lines · 19 code · 5 blank · 0 comment · 0 complexity · 81c2f6733d593d9c6aef08417b3e5219 MD5 · raw file
- package com.atlassian.maven.plugins.amps.product;
- import java.net.URISyntaxException;
- import org.junit.Test;
- import static org.junit.Assert.assertEquals;
- public class CrowdProductHandlerTest
- {
- @Test
- public void crowdServerUriConvertedToUseLocalhost() throws URISyntaxException
- {
- String uri = "http://example.test:8080/prefix/crowd?query#fragment";
- assertEquals("http://localhost:8080/prefix/crowd?query#fragment", CrowdProductHandler.withLocalhostAsHostname(uri));
- }
- @Test
- public void crowdServerUriConvertedToUseLocalhostWithHttps() throws URISyntaxException
- {
- String uri = "https://example.test:8080/prefix/crowd?query#fragment";
- assertEquals("https://localhost:8080/prefix/crowd?query#fragment", CrowdProductHandler.withLocalhostAsHostname(uri));
- }
- }