1 package ch
.cyberduck
.core
;
3 import ch
.cyberduck
.core
.proxy
.Proxy
;
4 import ch
.cyberduck
.core
.proxy
.ProxyFinder
;
5 import ch
.cyberduck
.core
.proxy
.SystemConfigurationProxy
;
6 import ch
.cyberduck
.core
.test
.Depends
;
10 import static org
.junit
.Assert
.assertEquals
;
11 import static org
.junit
.Assert
.assertTrue
;
16 @Depends(platform
= Factory
.Platform
.Name
.mac
)
17 public class SystemConfigurationProxyTest
extends AbstractTestCase
{
20 public void testFind() throws Exception
{
21 final SystemConfigurationProxy proxy
= new SystemConfigurationProxy();
22 assertEquals(Proxy
.Type
.DIRECT
, proxy
.find(new Host("cyberduck.io")).getType());
23 // assertEquals(Proxy.Type.HTTP, proxy.find(new Host(ProtocolFactory.WEBDAV, "cyberduck.io")).getType());
24 // assertEquals(Proxy.Type.HTTPS, proxy.find(new Host(ProtocolFactory.WEBDAV_SSL, "cyberduck.io")).getType());
28 public void testPassiveFTP() throws Exception
{
29 final ProxyFinder proxy
= new SystemConfigurationProxy();
30 assertTrue(proxy
.usePassiveFTP());
34 public void testExcludedLocalHost() throws Exception
{
35 final SystemConfigurationProxy proxy
= new SystemConfigurationProxy();
36 assertEquals(Proxy
.Type
.DIRECT
, proxy
.find(new Host("cyberduck.local")).getType());
40 public void testSimpleExcluded() throws Exception
{
41 final SystemConfigurationProxy proxy
= new SystemConfigurationProxy();
42 assertEquals(Proxy
.Type
.DIRECT
, proxy
.find(new Host(ProtocolFactory
.WEBDAV
, "simple")).getType());