Class MongoUnitCollection

java.lang.Object
org.mongounit.model.MongoUnitCollection

public class MongoUnitCollection extends Object
MongoUnitCollection class contains information needed to read or seed the database with for a single collection.
  • Constructor Details

    • MongoUnitCollection

      public MongoUnitCollection()
      Default constructor.
    • MongoUnitCollection

      public MongoUnitCollection(String collectionName, List<Map<String,Object>> documents)
      Constructor.
      Parameters:
      collectionName - Name of the collection.
      documents - List of maps of field name/value pairs of all the documents in this collection, where each map represents a single document.
  • Method Details

    • builder

      Returns:
      Instance of the builder pattern version of the MongoUnitCollection class.
    • getCollectionName

      public String getCollectionName()
      Returns:
      Name of the collection.
    • getDocuments

      public List<Map<String,Object>> getDocuments()
      Returns:
      List of maps of field name/value pairs of all the documents in this collection, where each map represents a single document.
    • setCollectionName

      public void setCollectionName(String collectionName)
      Parameters:
      collectionName - Name of the collection.
    • setDocuments

      public void setDocuments(List<Map<String,Object>> documents)
      Parameters:
      documents - List of maps of field name/value pairs of all the documents in this collection, where each map represents a single document.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object