commit
ee2ec9bc9d
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2012-2023 the original author or authors.
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -33,6 +33,7 @@ import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
|
|||
*
|
||||
* @author Phillip Webb
|
||||
* @author Madhura Bhave
|
||||
* @author Yanming Zhou
|
||||
*/
|
||||
class DefaultBindConstructorProviderTests {
|
||||
|
||||
|
|
@ -92,6 +93,12 @@ class DefaultBindConstructorProviderTests {
|
|||
.withMessageContaining("has more than one @ConstructorBinding");
|
||||
}
|
||||
|
||||
@Test
|
||||
void getBindConstructorWhenIsTypeWithPrivateConstructorReturnsNull() {
|
||||
Constructor<?> constructor = this.provider.getBindConstructor(TypeWithPrivateConstructor.class, false);
|
||||
assertThat(constructor).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
void getBindConstructorWhenIsMemberTypeWithPrivateConstructorReturnsNull() {
|
||||
Constructor<?> constructor = this.provider.getBindConstructor(MemberTypeWithPrivateConstructor.Member.class,
|
||||
|
|
@ -224,6 +231,13 @@ class DefaultBindConstructorProviderTests {
|
|||
|
||||
}
|
||||
|
||||
static final class TypeWithPrivateConstructor {
|
||||
|
||||
private TypeWithPrivateConstructor(Environment environment) {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static class MemberTypeWithPrivateConstructor {
|
||||
|
||||
static final class Member {
|
||||
|
|
|
|||
Loading…
Reference in New Issue