@Test public void newSvnClientManager_with_auth() { SvnConfiguration config = mock(SvnConfiguration.class); when(config.password()).thenReturn("password"); when(config.passPhrase()).thenReturn("passPhrase"); assertThat(newSvnClientManager(config)).isNotNull(); }
static SVNClientManager newSvnClientManager(SvnConfiguration configuration) { ISVNOptions options = SVNWCUtil.createDefaultOptions(true); final char[] passwordValue = getCharsOrNull(configuration.password()); final char[] passPhraseValue = getCharsOrNull(configuration.passPhrase()); ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager( null, configuration.username(), passwordValue, configuration.privateKey(), passPhraseValue, false); return SVNClientManager.newInstance(options, authManager); }
SvnPlugin implements Plugin { static SVNClientManager newSvnClientManager(SvnConfiguration configuration) { ISVNOptions options = SVNWCUtil.createDefaultOptions(true); final char[] passwordValue = getCharsOrNull(configuration.password()); final char[] passPhraseValue = getCharsOrNull(configuration.passPhrase()); ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager( null, configuration.username(), passwordValue, configuration.privateKey(), passPhraseValue, false); return SVNClientManager.newInstance(options, authManager); } }
SvnPlugin implements Plugin { static SVNClientManager newSvnClientManager(SvnConfiguration configuration) { ISVNOptions options = SVNWCUtil.createDefaultOptions(true); final char[] passwordValue = getCharsOrNull(configuration.password()); final char[] passPhraseValue = getCharsOrNull(configuration.passPhrase()); ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager( null, configuration.username(), passwordValue, configuration.privateKey(), passPhraseValue, false); return SVNClientManager.newInstance(options, authManager); }  }
SvnPlugin implements Plugin { static SVNClientManager newSvnClientManager(SvnConfiguration configuration) { ISVNOptions options = SVNWCUtil.createDefaultOptions(true); final char[] passwordValue = getCharsOrNull(configuration.password()); final char[] passPhraseValue = getCharsOrNull(configuration.passPhrase()); ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager( null, configuration.username(), passwordValue, configuration.privateKey(), passPhraseValue, false); return SVNClientManager.newInstance(options, authManager); }  @Override void define(Context context); }
SvnPlugin implements Plugin { static SVNClientManager newSvnClientManager(SvnConfiguration configuration) { ISVNOptions options = SVNWCUtil.createDefaultOptions(true); final char[] passwordValue = getCharsOrNull(configuration.password()); final char[] passPhraseValue = getCharsOrNull(configuration.passPhrase()); ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager( null, configuration.username(), passwordValue, configuration.privateKey(), passPhraseValue, false); return SVNClientManager.newInstance(options, authManager); }  @Override void define(Context context);  }