Codota Logo
MergedContextConfiguration.<init>
Code IndexAdd Codota 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)

  • Common ways to obtain MergedContextConfiguration
private void myMethod () {
MergedContextConfiguration m =
  • Codota IconMergedContextConfiguration mergedContextConfiguration;mergedContextConfiguration.getParent()
  • Smart code suggestions by Codota
}
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

/**
 * @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 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

@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 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 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 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 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 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

  • Reactive rest calls using spring rest template
  • setScale (BigDecimal)
  • findViewById (Activity)
  • getResourceAsStream (ClassLoader)
    Returns a stream for the resource with the specified name. See #getResource(String) for a descriptio
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • HashSet (java.util)
    This class implements the Set interface, backed by a hash table (actually a HashMap instance). It m
  • JLabel (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now