Harrison
2 years ago
2 changed files with 32 additions and 1 deletions
@ -0,0 +1,21 @@
|
||||
package com.fr.startup.ui; |
||||
|
||||
import org.junit.Assert; |
||||
import org.junit.Test; |
||||
|
||||
import static org.junit.Assert.*; |
||||
|
||||
public class StartupPageUtilTest { |
||||
|
||||
@Test |
||||
public void testGetRemoteAddress() throws Exception { |
||||
String remoteAddress = StartupPageUtil.getRemoteAddress("https://localhost:9090/webroot"); |
||||
Assert.assertEquals("localhost:9090", remoteAddress); |
||||
|
||||
String remoteAddress1 = StartupPageUtil.getRemoteAddress("https://localhost/webroot"); |
||||
Assert.assertEquals("localhost", remoteAddress1); |
||||
|
||||
String remoteAddress2 = StartupPageUtil.getRemoteAddress(null); |
||||
Assert.assertEquals("", remoteAddress2); |
||||
} |
||||
} |
Loading…
Reference in new issue