congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
AbstractTestCollection.makeFullCollection
Code IndexAdd Tabnine to your IDE (free)

How to use
makeFullCollection
method
in
org.apache.commons.collections.collection.AbstractTestCollection

Best Java code snippets using org.apache.commons.collections.collection.AbstractTestCollection.makeFullCollection (Showing top 2 results out of 315)

origin: commons-collections/commons-collections

/**
 *  Resets the {@link #collection} and {@link #confirmed} fields to full
 *  collections.  Invoke this method before performing a modification
 *  test.
 */
public void resetFull() {
  this.collection = makeFullCollection();
  this.confirmed = makeConfirmedFullCollection();
}
origin: commons-collections/commons-collections

public void testSerializeDeserializeThenCompare() throws Exception {
  Object obj = makeCollection();
  if (obj instanceof Serializable && isTestSerialization()) {
    ByteArrayOutputStream buffer = new ByteArrayOutputStream();
    ObjectOutputStream out = new ObjectOutputStream(buffer);
    out.writeObject(obj);
    out.close();
    ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(buffer.toByteArray()));
    Object dest = in.readObject();
    in.close();
    if (isEqualsCheckable()) {
      assertEquals("obj != deserialize(serialize(obj)) - EMPTY Collection", obj, dest);
    }
  }
  obj = makeFullCollection();
  if (obj instanceof Serializable && isTestSerialization()) {
    ByteArrayOutputStream buffer = new ByteArrayOutputStream();
    ObjectOutputStream out = new ObjectOutputStream(buffer);
    out.writeObject(obj);
    out.close();
    ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(buffer.toByteArray()));
    Object dest = in.readObject();
    in.close();
    if (isEqualsCheckable()) {
      assertEquals("obj != deserialize(serialize(obj)) - FULL Collection", obj, dest);
    }
  }
}

org.apache.commons.collections.collectionAbstractTestCollectionmakeFullCollection

Javadoc

Returns a full collection to be used for testing. The collection returned by this method should contain every element returned by #getFullElements(). The default implementation, in fact, simply invokes addAll on an empty collection with the results of #getFullElements(). Override this default if your collection doesn't support addAll.

Popular methods of AbstractTestCollection

  • areEqualElementsDistinguishable
    Specifies whether equal elements in the collection are, in fact, distinguishable with information no
  • assertEquals
  • assertTrue
  • cloneMapEntry
    Creates a new Map Entry that is independent of the first and the map.
  • fail
  • getFullElements
    Returns an array of objects that are contained in a collection produced by #makeFullCollection(). Ev
  • getFullNonNullElements
    Returns a list of elements suitable for return by #getFullElements(). The array returned by this met
  • getOtherElements
    Returns an array of elements that are not contained in a full collection. Every element in the retur
  • getOtherNonNullElements
    Returns the default list of objects returned by #getOtherElements(). Includes many objects of differ
  • isAddSupported
    Returns true if the collections produced by #makeCollection() and #makeFullCollection()support the a
  • isEqualsCheckable
    Returns true to indicate that the collection supports equals() comparisons. This implementation retu
  • isFailFastSupported
    Returns true to indicate that the collection supports fail fast iterators. The default implementatio
  • isEqualsCheckable,
  • isFailFastSupported,
  • isNullSupported,
  • isRemoveSupported,
  • isTestSerialization,
  • makeCollection,
  • makeConfirmedCollection,
  • makeConfirmedFullCollection,
  • resetEmpty

Popular in Java

  • Reactive rest calls using spring rest template
  • getSystemService (Context)
  • setContentView (Activity)
  • onRequestPermissionsResult (Fragment)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top Sublime Text plugins
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