Apply updated Code Style
Closes gh-13881
This commit is contained in:
+5
-5
@@ -64,9 +64,9 @@ public class JndiDnsResolverTests {
|
||||
@Test
|
||||
public void testResolveIpAddressNotExisting() throws Exception {
|
||||
given(this.context.getAttributes(any(String.class), any(String[].class)))
|
||||
.willThrow(new NameNotFoundException("not found"));
|
||||
.willThrow(new NameNotFoundException("not found"));
|
||||
assertThatExceptionOfType(DnsEntryNotFoundException.class)
|
||||
.isThrownBy(() -> this.dnsResolver.resolveIpAddress("notexisting.ansdansdugiuzgguzgioansdiandwq.foo"));
|
||||
.isThrownBy(() -> this.dnsResolver.resolveIpAddress("notexisting.ansdansdugiuzgguzgioansdiandwq.foo"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -80,9 +80,9 @@ public class JndiDnsResolverTests {
|
||||
@Test
|
||||
public void testResolveServiceEntryNotExisting() throws Exception {
|
||||
given(this.context.getAttributes(any(String.class), any(String[].class)))
|
||||
.willThrow(new NameNotFoundException("not found"));
|
||||
.willThrow(new NameNotFoundException("not found"));
|
||||
assertThatExceptionOfType(DnsEntryNotFoundException.class)
|
||||
.isThrownBy(() -> this.dnsResolver.resolveServiceEntry("wrong", "secpod.de"));
|
||||
.isThrownBy(() -> this.dnsResolver.resolveServiceEntry("wrong", "secpod.de"));
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -108,7 +108,7 @@ public class JndiDnsResolverTests {
|
||||
@Test
|
||||
public void testUnknowError() throws Exception {
|
||||
given(this.context.getAttributes(any(String.class), any(String[].class)))
|
||||
.willThrow(new NamingException("error"));
|
||||
.willThrow(new NamingException("error"));
|
||||
assertThatExceptionOfType(DnsLookupException.class).isThrownBy(() -> this.dnsResolver.resolveIpAddress(""));
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -62,9 +62,10 @@ public class ContextPropagatingRemoteInvocationTests {
|
||||
// Set up the wrong arguments.
|
||||
remoteInvocation.setArguments(new Object[] {});
|
||||
assertThatIllegalArgumentException()
|
||||
.isThrownBy(() -> remoteInvocation.invoke(TargetObject.class.newInstance()));
|
||||
.isThrownBy(() -> remoteInvocation.invoke(TargetObject.class.newInstance()));
|
||||
assertThat(SecurityContextHolder.getContext().getAuthentication())
|
||||
.withFailMessage("Authentication must be null").isNull();
|
||||
.withFailMessage("Authentication must be null")
|
||||
.isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user