@Test void getServerIdForDataPart_full() { MockConfigPart data = new MockConfigPart() .withServerName("1234") .withUsername("luser") .withPassword("my password") .withAuthTicketFile(new File("auth-ticket-file")) .withTrustTicketFile(new File("trust-ticket-file")) .withServerFingerprint("1234asdf1234asdf"); assertEquals("localhost:1234" + SEP + "luser" + SEP + "auth-ticket-file" + SEP + "trust-ticket-file" + SEP + "1234asdf1234asdf", ServerConfig.getServerIdForDataPart(data)); }
.withServerName("servername") .withClientname("client") .withTrustTicketFile(trustFile) .withAuthTicketFile(authFile) .withServerFingerprint("abcd")
.withServerFingerprint("fingerprint") .withAuthTicketFile(authFile) .withTrustTicketFile(trustFile) .withClientHostname("hostname") .withDefaultCharset("charset")
.withServerFingerprint("fingerprint") .withAuthTicketFile(authFile) .withTrustTicketFile(trustFile) .withClientHostname("hostname") .withDefaultCharset("charset")
public MockConfigPart copy() { MockConfigPart ret = new MockConfigPart() .withSourceName(sourceName) .withP4ServerName(serverName) .withClientname(clientname) .withUsername(username) .withAuthTicketFile(authTicketFile) .withTrustTicketFile(trustTicketFile) .withServerFingerprint(serverFingerprint) .withClientHostname(clientHostname) .withIgnoreFileName(ignoreFileName) .withDefaultCharset(defaultCharset) .withLoginSso(loginSso) .withReloadValue(reloadValue) .withRequiresUserEnteredPassword(requiresUserEnteredPassword); if (hasPasswordSet) { ret.withPassword(password); } else { ret.withNoPassword(); } return ret; }
.withAuthTicketFile(authTicket) .withServerFingerprint("abcdef1234567890") .withTrustTicketFile(trustTicket) .withClientHostname("host1") .withConfigProblems(createWarning(), createError())
.withAuthTicketFile(authTicket) .withServerFingerprint("--abcdef1234567890") .withTrustTicketFile(trustTicket) .withConfigProblems(createWarning(), createError()) .withDefaultCharset("UTF-8")