Package org.sonatype.nexus.proxy.storage.remote

Examples of org.sonatype.nexus.proxy.storage.remote.DefaultRemoteStorageContext


        jmxInstaller,
        null);

    // nothing NTLM related present
    {
      final DefaultRemoteStorageContext drsc = new DefaultRemoteStorageContext(null);
      Assert.assertFalse("No auth-proxy set", testSubject.reuseConnectionsNeeded(drsc));
    }

    // remote auth is NTLM
    {
      final DefaultRemoteStorageContext drsc = new DefaultRemoteStorageContext(null);
      drsc.setRemoteAuthenticationSettings(new NtlmRemoteAuthenticationSettings("a", "b", "c", "d"));
      Assert.assertTrue("NTLM target auth-proxy set", testSubject.reuseConnectionsNeeded(drsc));
    }

    // HTTP proxy is NTLM
    {
View Full Code Here


  private ProxyRepository getFakeProxyRepository(final String remoteUrl) {
    final ProxyRepository repository = Mockito.mock(ProxyRepository.class);
    Mockito.when(repository.getRemoteUrl()).thenReturn(remoteUrl);

    final DefaultRemoteStorageContext rsc = new DefaultRemoteStorageContext(null);
    rsc.setRemoteProxySettings(remoteProxySettings);
    rsc.setRemoteConnectionSettings(new DefaultRemoteConnectionSettings());
    Mockito.when(repository.getRemoteStorageContext()).thenReturn(rsc);

    return repository;
  }
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.proxy.storage.remote.DefaultRemoteStorageContext

Copyright © 2018 www.massapicom. 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.