Tabnine Logo
MergedContextConfiguration.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.springframework.test.context.MergedContextConfiguration
constructor

Best Java code snippets using org.springframework.test.context.MergedContextConfiguration.<init> (Showing top 20 results out of 315)

origin: spring-projects/spring-framework

@Test
public void equalsWithNullArrays() {
  MergedContextConfiguration mergedConfig1 = new MergedContextConfiguration(getClass(), null, null, null, loader);
  MergedContextConfiguration mergedConfig2 = new MergedContextConfiguration(getClass(), null, null, null, loader);
  assertEquals(mergedConfig1, mergedConfig2);
}
origin: spring-projects/spring-framework

@Test
public void equalsWithSameDuplicateProfiles() {
  String[] activeProfiles1 = new String[] { "catbert", "dogbert" };
  String[] activeProfiles2 = new String[] { "catbert", "dogbert", "catbert", "dogbert", "catbert" };
  MergedContextConfiguration mergedConfig1 = new MergedContextConfiguration(getClass(),
      EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, activeProfiles1, loader);
  MergedContextConfiguration mergedConfig2 = new MergedContextConfiguration(getClass(),
      EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, activeProfiles2, loader);
  assertEquals(mergedConfig1, mergedConfig2);
}
origin: spring-projects/spring-framework

@Test
public void equalsWithEmptyArrays() {
  MergedContextConfiguration mergedConfig1 = new MergedContextConfiguration(getClass(),
      EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, EMPTY_STRING_ARRAY, loader);
  MergedContextConfiguration mergedConfig2 = new MergedContextConfiguration(getClass(),
      EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, EMPTY_STRING_ARRAY, loader);
  assertEquals(mergedConfig1, mergedConfig2);
}
origin: spring-projects/spring-framework

@Test
public void equalsWithSameProfilesReversed() {
  String[] activeProfiles1 = new String[] { "catbert", "dogbert" };
  String[] activeProfiles2 = new String[] { "dogbert", "catbert" };
  MergedContextConfiguration mergedConfig1 = new MergedContextConfiguration(getClass(),
      EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, activeProfiles1, loader);
  MergedContextConfiguration mergedConfig2 = new MergedContextConfiguration(getClass(),
      EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, activeProfiles2, loader);
  assertNotEquals(mergedConfig1, mergedConfig2);
}
origin: spring-projects/spring-framework

/**
 * @since 4.3
 */
@Test
public void equalsWithSameContextCustomizers() {
  Set<ContextCustomizer> customizers = Collections.singleton(mock(ContextCustomizer.class));
  MergedContextConfiguration mergedConfig1 = new MergedContextConfiguration(getClass(), EMPTY_STRING_ARRAY,
    EMPTY_CLASS_ARRAY, null, EMPTY_STRING_ARRAY, null, null, customizers, loader, null, null);
  MergedContextConfiguration mergedConfig2 = new MergedContextConfiguration(getClass(), EMPTY_STRING_ARRAY,
    EMPTY_CLASS_ARRAY, null, EMPTY_STRING_ARRAY, null, null, customizers, loader, null, null);
  assertEquals(mergedConfig1, mergedConfig2);
}
origin: spring-projects/spring-framework

@Test
public void equalsWithSameLocations() {
  String[] locations = new String[] { "foo", "bar}" };
  MergedContextConfiguration mergedConfig1 = new MergedContextConfiguration(getClass(),
      locations, EMPTY_CLASS_ARRAY, EMPTY_STRING_ARRAY, loader);
  MergedContextConfiguration mergedConfig2 = new MergedContextConfiguration(getClass(),
      locations, EMPTY_CLASS_ARRAY, EMPTY_STRING_ARRAY, loader);
  assertEquals(mergedConfig1, mergedConfig2);
}
origin: spring-projects/spring-framework

@Test
public void equalsWithSameProfiles() {
  String[] activeProfiles = new String[] { "catbert", "dogbert" };
  MergedContextConfiguration mergedConfig1 = new MergedContextConfiguration(getClass(),
      EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, activeProfiles, loader);
  MergedContextConfiguration mergedConfig2 = new MergedContextConfiguration(getClass(),
      EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, activeProfiles, loader);
  assertEquals(mergedConfig1, mergedConfig2);
}
origin: spring-projects/spring-framework

@Test
public void equalsWithDifferentLocations() {
  String[] locations1 = new String[] { "foo", "bar}" };
  String[] locations2 = new String[] { "baz", "quux}" };
  MergedContextConfiguration mergedConfig1 = new MergedContextConfiguration(getClass(),
      locations1, EMPTY_CLASS_ARRAY, EMPTY_STRING_ARRAY, loader);
  MergedContextConfiguration mergedConfig2 = new MergedContextConfiguration(getClass(),
      locations2, EMPTY_CLASS_ARRAY, EMPTY_STRING_ARRAY, loader);
  assertNotEquals(mergedConfig1, mergedConfig2);
  assertNotEquals(mergedConfig2, mergedConfig1);
}
origin: spring-projects/spring-framework

@Test
public void equalsWithDifferentProfiles() {
  String[] activeProfiles1 = new String[] { "catbert", "dogbert" };
  String[] activeProfiles2 = new String[] { "X", "Y" };
  MergedContextConfiguration mergedConfig1 = new MergedContextConfiguration(getClass(),
      EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, activeProfiles1, loader);
  MergedContextConfiguration mergedConfig2 = new MergedContextConfiguration(getClass(),
      EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, activeProfiles2, loader);
  assertNotEquals(mergedConfig1, mergedConfig2);
  assertNotEquals(mergedConfig2, mergedConfig1);
}
origin: spring-projects/spring-framework

@Test
public void equalsWithDifferentConfigClasses() {
  Class<?>[] classes1 = new Class<?>[] { String.class, Integer.class };
  Class<?>[] classes2 = new Class<?>[] { Boolean.class, Number.class };
  MergedContextConfiguration mergedConfig1 = new MergedContextConfiguration(getClass(),
      EMPTY_STRING_ARRAY, classes1, EMPTY_STRING_ARRAY, loader);
  MergedContextConfiguration mergedConfig2 = new MergedContextConfiguration(getClass(),
      EMPTY_STRING_ARRAY, classes2, EMPTY_STRING_ARRAY, loader);
  assertNotEquals(mergedConfig1, mergedConfig2);
  assertNotEquals(mergedConfig2, mergedConfig1);
}
origin: spring-projects/spring-framework

@Test
public void hashCodeWithNullArrays() {
  MergedContextConfiguration mergedConfig1 = new MergedContextConfiguration(getClass(), null, null, null, loader);
  MergedContextConfiguration mergedConfig2 = new MergedContextConfiguration(getClass(), null, null, null, loader);
  assertEquals(mergedConfig1.hashCode(), mergedConfig2.hashCode());
}
origin: spring-projects/spring-framework

@Test
public void hashCodeWithEmptyArrays() {
  MergedContextConfiguration mergedConfig1 = new MergedContextConfiguration(getClass(),
      EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, EMPTY_STRING_ARRAY, loader);
  MergedContextConfiguration mergedConfig2 = new MergedContextConfiguration(getClass(),
      EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, EMPTY_STRING_ARRAY, loader);
  assertEquals(mergedConfig1.hashCode(), mergedConfig2.hashCode());
}
origin: spring-projects/spring-framework

@Test
public void hashCodeWithDifferentConfigClasses() {
  Class<?>[] classes1 = new Class<?>[] { String.class, Integer.class };
  Class<?>[] classes2 = new Class<?>[] { Boolean.class, Number.class };
  MergedContextConfiguration mergedConfig1 = new MergedContextConfiguration(getClass(),
      EMPTY_STRING_ARRAY, classes1, EMPTY_STRING_ARRAY, loader);
  MergedContextConfiguration mergedConfig2 = new MergedContextConfiguration(getClass(),
      EMPTY_STRING_ARRAY, classes2, EMPTY_STRING_ARRAY, loader);
  assertNotEquals(mergedConfig1.hashCode(), mergedConfig2.hashCode());
}
origin: spring-projects/spring-framework

@Test
public void hashCodeWithNulls() {
  MergedContextConfiguration mergedConfig1 = new MergedContextConfiguration(null, null, null, null, null);
  MergedContextConfiguration mergedConfig2 = new MergedContextConfiguration(null, null, null, null, null);
  assertEquals(mergedConfig1.hashCode(), mergedConfig2.hashCode());
}
origin: spring-projects/spring-framework

@Test
public void loadContextWithConfigurationClass() throws Exception {
  MergedContextConfiguration mergedConfig = new MergedContextConfiguration(ConfigClassTestCase.class,
      EMPTY_STRING_ARRAY, new Class<?>[] {ConfigClassTestCase.Config.class}, EMPTY_STRING_ARRAY, loader);
  assertApplicationContextLoadsAndContainsFooString(mergedConfig);
}
origin: spring-projects/spring-framework

@Test
public void configMustNotContainAnnotatedClasses() throws Exception {
  expectedException.expect(IllegalStateException.class);
  expectedException.expectMessage(containsString("does not support annotated classes"));
  GenericXmlContextLoader loader = new GenericXmlContextLoader();
  MergedContextConfiguration mergedConfig = new MergedContextConfiguration(getClass(), EMPTY_STRING_ARRAY,
    new Class<?>[] { getClass() }, EMPTY_STRING_ARRAY, loader);
  loader.loadContext(mergedConfig);
}
origin: spring-projects/spring-framework

/**
 * @since 4.0.4
 */
@Test
public void configMustNotContainLocations() throws Exception {
  expectedException.expect(IllegalStateException.class);
  expectedException.expectMessage(containsString("does not support resource locations"));
  MergedContextConfiguration mergedConfig = new MergedContextConfiguration(getClass(),
    new String[] { "config.xml" }, EMPTY_CLASS_ARRAY, EMPTY_STRING_ARRAY, contextLoader);
  contextLoader.loadContext(mergedConfig);
}
origin: spring-projects/spring-framework

@Test
public void configMustNotContainAnnotatedClasses() throws Exception {
  expectedException.expect(IllegalStateException.class);
  expectedException.expectMessage(containsString("does not support annotated classes"));
  GenericPropertiesContextLoader loader = new GenericPropertiesContextLoader();
  MergedContextConfiguration mergedConfig = new MergedContextConfiguration(getClass(), EMPTY_STRING_ARRAY,
    new Class<?>[] { getClass() }, EMPTY_STRING_ARRAY, loader);
  loader.loadContext(mergedConfig);
}
origin: spring-projects/spring-framework

@Test
public void loadContextWithoutLocationsAndConfigurationClasses() throws Exception {
  expectedException.expect(IllegalStateException.class);
  expectedException.expectMessage(startsWith("Neither"));
  expectedException.expectMessage(containsString("was able to load an ApplicationContext from"));
  MergedContextConfiguration mergedConfig = new MergedContextConfiguration(
      getClass(), EMPTY_STRING_ARRAY, EMPTY_CLASS_ARRAY, EMPTY_STRING_ARRAY, loader);
  loader.loadContext(mergedConfig);
}
origin: spring-projects/spring-framework

@Test
public void equalsBasics() {
  MergedContextConfiguration mergedConfig = new MergedContextConfiguration(null, null, null, null, null);
  assertEquals(mergedConfig, mergedConfig);
  assertNotEquals(mergedConfig, null);
  assertNotEquals(mergedConfig, 1);
}
org.springframework.test.contextMergedContextConfiguration<init>

Javadoc

Create a new MergedContextConfiguration instance for the supplied parameters.

Popular methods of MergedContextConfiguration

  • getLocations
    Get the merged resource locations for ApplicationContextconfiguration files for the #getTestClass().
  • getTestClass
    Get the Class associated with this MergedContextConfiguration.
  • getActiveProfiles
    Get the merged active bean definition profiles for the #getTestClass().
  • getClasses
    Get the merged annotated classes for the #getTestClass().
  • getContextLoader
    Get the resolved ContextLoader for the #getTestClass().
  • getParent
    Get the MergedContextConfiguration for the parent application context in a context hierarchy.
  • getParentApplicationContext
    Get the parent ApplicationContext for the context defined by this MergedContextConfiguration from th
  • getContextInitializerClasses
    Get the merged ApplicationContextInitializer classes for the #getTestClass().
  • getPropertySourceProperties
    Get the merged test PropertySource properties for the #getTestClass().Properties will be loaded into
  • hasLocations
    Determine if this MergedContextConfiguration instance has path-based context resource locations.
  • getContextCustomizers
    Get the merged ContextCustomizer that will be applied when the application context is loaded.
  • getPropertySourceLocations
    Get the merged resource locations for test PropertySourcesfor the #getTestClass().
  • getContextCustomizers,
  • getPropertySourceLocations,
  • hasClasses,
  • hashCode,
  • equals,
  • nullSafeClassName,
  • processActiveProfiles,
  • processClasses,
  • processContextCustomizers

Popular in Java

  • Start an intent from android
  • getContentResolver (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • scheduleAtFixedRate (Timer)
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • JOptionPane (javax.swing)
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now