Examples of lookupHttpPort()


Examples of org.springframework.security.web.PortMapperImpl.lookupHttpPort()

public class PortMapperImplTests extends TestCase {
    //~ Methods ========================================================================================================

    public void testDefaultMappingsAreKnown() throws Exception {
        PortMapperImpl portMapper = new PortMapperImpl();
        assertEquals(Integer.valueOf(80), portMapper.lookupHttpPort(Integer.valueOf(443)));
        assertEquals(Integer.valueOf(8080), portMapper.lookupHttpPort(Integer.valueOf(8443)));
        assertEquals(Integer.valueOf(443), portMapper.lookupHttpsPort(Integer.valueOf(80)));
        assertEquals(Integer.valueOf(8443), portMapper.lookupHttpsPort(Integer.valueOf(8080)));
    }
View Full Code Here

Examples of org.springframework.security.web.PortMapperImpl.lookupHttpPort()

    //~ Methods ========================================================================================================

    public void testDefaultMappingsAreKnown() throws Exception {
        PortMapperImpl portMapper = new PortMapperImpl();
        assertEquals(Integer.valueOf(80), portMapper.lookupHttpPort(Integer.valueOf(443)));
        assertEquals(Integer.valueOf(8080), portMapper.lookupHttpPort(Integer.valueOf(8443)));
        assertEquals(Integer.valueOf(443), portMapper.lookupHttpsPort(Integer.valueOf(80)));
        assertEquals(Integer.valueOf(8443), portMapper.lookupHttpsPort(Integer.valueOf(8080)));
    }

    public void testDetectsEmptyMap() throws Exception {
View Full Code Here

Examples of org.springframework.security.web.PortMapperImpl.lookupHttpPort()

        }
    }

    public void testReturnsNullIfHttpPortCannotBeFound() {
        PortMapperImpl portMapper = new PortMapperImpl();
        assertTrue(portMapper.lookupHttpPort(Integer.valueOf("34343")) == null);
    }

    public void testSupportsCustomMappings() {
        PortMapperImpl portMapper = new PortMapperImpl();
        Map<String, String> map = new HashMap<String, String>();
View Full Code Here

Examples of org.springframework.security.web.PortMapperImpl.lookupHttpPort()

        Map<String, String> map = new HashMap<String, String>();
        map.put("79", "442");

        portMapper.setPortMappings(map);

        assertEquals(Integer.valueOf(79), portMapper.lookupHttpPort(Integer.valueOf(442)));
        assertEquals(Integer.valueOf(442), portMapper.lookupHttpsPort(Integer.valueOf(79)));
    }
}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.