Class MongoUnitDatasets

java.lang.Object
org.mongounit.model.MongoUnitDatasets

public class MongoUnitDatasets extends Object
MongoUnitDatasets class contains seed and assert datasets.
  • Constructor Details

    • MongoUnitDatasets

      public MongoUnitDatasets()
      Default constructor.
    • MongoUnitDatasets

      public MongoUnitDatasets(List<MongoUnitCollection> seedWithDatasets, List<MongoUnitCollection> assertMatchesDatasets, boolean assertAnnotationPresent)
      Constructor.
      Parameters:
      seedWithDatasets - Datasets to seed the database with.
      assertMatchesDatasets - Datasets to verify matching with.
      assertAnnotationPresent - Flag to indicate if AssertMatchesDataset annotation has been encountered, i.e., the 'assertMatchesDatasets' should actually be used to assert matches, as opposed to having 'assertMatchesDatasets' only there from SeedWithDataset with 'reuseForAssertion = true'.
  • Method Details

    • getSeedWithDatasets

      public List<MongoUnitCollection> getSeedWithDatasets()
      Returns:
      Datasets to seed the database with.
    • setSeedWithDatasets

      public void setSeedWithDatasets(List<MongoUnitCollection> seedWithDatasets)
      Parameters:
      seedWithDatasets - Datasets to seed the database with.
    • getAssertMatchesDatasets

      public List<MongoUnitCollection> getAssertMatchesDatasets()
      Returns:
      Datasets to verify matching with.
    • setAssertMatchesDatasets

      public void setAssertMatchesDatasets(List<MongoUnitCollection> assertMatchesDatasets)
      Parameters:
      assertMatchesDatasets - Datasets to verify matching with.
    • isAssertAnnotationPresent

      public boolean isAssertAnnotationPresent()
      Returns:
      Flag to indicate if AssertMatchesDataset annotation has been encountered, i.e., the 'assertMatchesDatasets' should actually be used to assert matches, as opposed to having 'assertMatchesDatasets' only there from SeedWithDataset with 'reuseForAssertion = true'.
    • setAssertAnnotationPresent

      public void setAssertAnnotationPresent(boolean assertAnnotationPresent)
      Parameters:
      assertAnnotationPresent - Flag to indicate if AssertMatchesDataset annotation has been encountered, i.e., the 'assertMatchesDatasets' should actually be used to assert matches, as opposed to having 'assertMatchesDatasets' only there from SeedWithDataset with 'reuseForAssertion = true'.
    • toString

      public String toString()
      Overrides:
      toString in class Object