/** * Generate a unique hash code for all properties of this * {@code MergedContextConfiguration} excluding the * {@linkplain #getTestClass() test class}. */ @Override public int hashCode() { int result = Arrays.hashCode(this.locations); result = 31 * result + Arrays.hashCode(this.classes); result = 31 * result + this.contextInitializerClasses.hashCode(); result = 31 * result + Arrays.hashCode(this.activeProfiles); result = 31 * result + Arrays.hashCode(this.propertySourceLocations); result = 31 * result + Arrays.hashCode(this.propertySourceProperties); result = 31 * result + this.contextCustomizers.hashCode(); result = 31 * result + (this.parent != null ? this.parent.hashCode() : 0); result = 31 * result + nullSafeClassName(this.contextLoader).hashCode(); return result; }
if (!nullSafeClassName(this.contextLoader).equals(nullSafeClassName(otherConfig.contextLoader))) { return false;
/** * Provide a String representation of the {@linkplain #getTestClass() test class}, * {@linkplain #getLocations() locations}, {@linkplain #getClasses() annotated classes}, * {@linkplain #getContextInitializerClasses() context initializer classes}, * {@linkplain #getActiveProfiles() active profiles}, * {@linkplain #getPropertySourceLocations() property source locations}, * {@linkplain #getPropertySourceProperties() property source properties}, * {@linkplain #getContextCustomizers() context customizers}, * the name of the {@link #getContextLoader() ContextLoader}, and the * {@linkplain #getParent() parent configuration}. */ @Override public String toString() { return new ToStringCreator(this) .append("testClass", this.testClass) .append("locations", ObjectUtils.nullSafeToString(this.locations)) .append("classes", ObjectUtils.nullSafeToString(this.classes)) .append("contextInitializerClasses", ObjectUtils.nullSafeToString(this.contextInitializerClasses)) .append("activeProfiles", ObjectUtils.nullSafeToString(this.activeProfiles)) .append("propertySourceLocations", ObjectUtils.nullSafeToString(this.propertySourceLocations)) .append("propertySourceProperties", ObjectUtils.nullSafeToString(this.propertySourceProperties)) .append("contextCustomizers", this.contextCustomizers) .append("contextLoader", nullSafeClassName(this.contextLoader)) .append("parent", this.parent) .toString(); }
/** * Generate a unique hash code for all properties of this * {@code MergedContextConfiguration} excluding the * {@linkplain #getTestClass() test class}. */ @Override public int hashCode() { int result = Arrays.hashCode(this.locations); result = 31 * result + Arrays.hashCode(this.classes); result = 31 * result + this.contextInitializerClasses.hashCode(); result = 31 * result + Arrays.hashCode(this.activeProfiles); result = 31 * result + Arrays.hashCode(this.propertySourceLocations); result = 31 * result + Arrays.hashCode(this.propertySourceProperties); result = 31 * result + this.contextCustomizers.hashCode(); result = 31 * result + (this.parent != null ? this.parent.hashCode() : 0); result = 31 * result + nullSafeClassName(this.contextLoader).hashCode(); return result; }
if (!nullSafeClassName(this.contextLoader).equals(nullSafeClassName(otherConfig.contextLoader))) { return false;
/** * Provide a String representation of the {@linkplain #getTestClass() test class}, * {@linkplain #getLocations() locations}, {@linkplain #getClasses() annotated classes}, * {@linkplain #getContextInitializerClasses() context initializer classes}, * {@linkplain #getActiveProfiles() active profiles}, * {@linkplain #getPropertySourceLocations() property source locations}, * {@linkplain #getPropertySourceProperties() property source properties}, * {@linkplain #getContextCustomizers() context customizers}, * the name of the {@link #getContextLoader() ContextLoader}, and the * {@linkplain #getParent() parent configuration}. */ @Override public String toString() { return new ToStringCreator(this) .append("testClass", this.testClass) .append("locations", ObjectUtils.nullSafeToString(this.locations)) .append("classes", ObjectUtils.nullSafeToString(this.classes)) .append("contextInitializerClasses", ObjectUtils.nullSafeToString(this.contextInitializerClasses)) .append("activeProfiles", ObjectUtils.nullSafeToString(this.activeProfiles)) .append("propertySourceLocations", ObjectUtils.nullSafeToString(this.propertySourceLocations)) .append("propertySourceProperties", ObjectUtils.nullSafeToString(this.propertySourceProperties)) .append("contextCustomizers", this.contextCustomizers) .append("contextLoader", nullSafeClassName(this.contextLoader)) .append("parent", this.parent) .toString(); }