Class MongoUnitAnnotations

java.lang.Object
org.mongounit.model.MongoUnitAnnotations

public class MongoUnitAnnotations extends Object
MongoUnitAnnotations class is a holder of AssertMatchesDataset and SeedWithDataset annotations discovered on a test class or a test method.
  • Constructor Details

    • MongoUnitAnnotations

      public MongoUnitAnnotations()
      Default constructor.
    • MongoUnitAnnotations

      public MongoUnitAnnotations(List<SeedWithDataset> seedWithDatasetAnnotations, List<AssertMatchesDataset> assertMatchesDatasetAnnotations)
      Constructor. Initializes both lists to avoid NPE when adding new items.
      Parameters:
      seedWithDatasetAnnotations - List of SeedWithDataset annotations discovered on a test class or method.
      assertMatchesDatasetAnnotations - List of AssertMatchesDataset annotations discovered on a test class or method.
  • Method Details

    • getSeedWithDatasetAnnotations

      public List<SeedWithDataset> getSeedWithDatasetAnnotations()
      Returns:
      seedWithDatasetAnnotations List of SeedWithDataset annotations discovered on a test class or method.
    • setSeedWithDatasetAnnotations

      public void setSeedWithDatasetAnnotations(List<SeedWithDataset> seedWithDatasetAnnotations)
      Parameters:
      seedWithDatasetAnnotations - seedWithDatasetAnnotations List of SeedWithDataset annotations discovered on a test class or method.
    • getAssertMatchesDatasetAnnotations

      public List<AssertMatchesDataset> getAssertMatchesDatasetAnnotations()
      Returns:
      List of AssertMatchesDataset annotations discovered on a test class or method.
    • setAssertMatchesDatasetAnnotations

      public void setAssertMatchesDatasetAnnotations(List<AssertMatchesDataset> assertMatchesDatasetAnnotations)
      Parameters:
      assertMatchesDatasetAnnotations - List of AssertMatchesDataset annotations discovered on a test class or method.
    • addSeedWithDatasetAnnotation

      public void addSeedWithDatasetAnnotation(SeedWithDataset seedWithDatasetAnnotation)
      Adds the provided 'seedWithDatasetAnnotation' to the list of SeedWithDataset annotations.
      Parameters:
      seedWithDatasetAnnotation - SeedWithDataset annotation to add to the list.
    • addSeedWithDatasetAnnotations

      public void addSeedWithDatasetAnnotations(SeedWithDataset[] seedWithDatasetAnnotations)
      Adds the provided 'seedWithDatasetAnnotations' to the list of SeedWithDataset annotations.
      Parameters:
      seedWithDatasetAnnotations - Array of SeedWithDataset annotations to add to the list.
    • addAssertMatchesDatasetAnnotation

      public void addAssertMatchesDatasetAnnotation(AssertMatchesDataset assertMatchesDatasetAnnotation)
      Adds the provided 'assertMatchesDatasetAnnotation' to the list of AssertMatchesDataset annotations.
      Parameters:
      assertMatchesDatasetAnnotation - AssertMatchesDataset annotation to add to the list.
    • addAssertMatchesDatasetAnnotations

      public void addAssertMatchesDatasetAnnotations(AssertMatchesDataset[] assertMatchesDatasetAnnotations)
      Adds the provided 'assertMatchesDatasetAnnotations' to the list of AssertMatchesDataset annotations.
      Parameters:
      assertMatchesDatasetAnnotations - Array of AssertMatchesDataset annotations to add to the list.
    • toString

      public String toString()
      Overrides:
      toString in class Object