Package org.mongounit.model
Class MongoUnitAnnotations
java.lang.Object
org.mongounit.model.MongoUnitAnnotations
MongoUnitAnnotations class is a holder of AssertMatchesDataset and SeedWithDataset annotations discovered on a test class or a test method.-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.MongoUnitAnnotations(List<SeedWithDataset> seedWithDatasetAnnotations, List<AssertMatchesDataset> assertMatchesDatasetAnnotations) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAssertMatchesDatasetAnnotation(AssertMatchesDataset assertMatchesDatasetAnnotation) Adds the provided 'assertMatchesDatasetAnnotation' to the list ofAssertMatchesDatasetannotations.voidaddAssertMatchesDatasetAnnotations(AssertMatchesDataset[] assertMatchesDatasetAnnotations) Adds the provided 'assertMatchesDatasetAnnotations' to the list ofAssertMatchesDatasetannotations.voidaddSeedWithDatasetAnnotation(SeedWithDataset seedWithDatasetAnnotation) Adds the provided 'seedWithDatasetAnnotation' to the list ofSeedWithDatasetannotations.voidaddSeedWithDatasetAnnotations(SeedWithDataset[] seedWithDatasetAnnotations) Adds the provided 'seedWithDatasetAnnotations' to the list ofSeedWithDatasetannotations.voidsetAssertMatchesDatasetAnnotations(List<AssertMatchesDataset> assertMatchesDatasetAnnotations) voidsetSeedWithDatasetAnnotations(List<SeedWithDataset> seedWithDatasetAnnotations) toString()
-
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 ofSeedWithDatasetannotations discovered on a test class or method.assertMatchesDatasetAnnotations- List ofAssertMatchesDatasetannotations discovered on a test class or method.
-
-
Method Details
-
getSeedWithDatasetAnnotations
- Returns:
- seedWithDatasetAnnotations List of
SeedWithDatasetannotations discovered on a test class or method.
-
setSeedWithDatasetAnnotations
- Parameters:
seedWithDatasetAnnotations- seedWithDatasetAnnotations List ofSeedWithDatasetannotations discovered on a test class or method.
-
getAssertMatchesDatasetAnnotations
- Returns:
- List of
AssertMatchesDatasetannotations discovered on a test class or method.
-
setAssertMatchesDatasetAnnotations
public void setAssertMatchesDatasetAnnotations(List<AssertMatchesDataset> assertMatchesDatasetAnnotations) - Parameters:
assertMatchesDatasetAnnotations- List ofAssertMatchesDatasetannotations discovered on a test class or method.
-
addSeedWithDatasetAnnotation
Adds the provided 'seedWithDatasetAnnotation' to the list ofSeedWithDatasetannotations.- Parameters:
seedWithDatasetAnnotation-SeedWithDatasetannotation to add to the list.
-
addSeedWithDatasetAnnotations
Adds the provided 'seedWithDatasetAnnotations' to the list ofSeedWithDatasetannotations.- Parameters:
seedWithDatasetAnnotations- Array ofSeedWithDatasetannotations to add to the list.
-
addAssertMatchesDatasetAnnotation
Adds the provided 'assertMatchesDatasetAnnotation' to the list ofAssertMatchesDatasetannotations.- Parameters:
assertMatchesDatasetAnnotation-AssertMatchesDatasetannotation to add to the list.
-
addAssertMatchesDatasetAnnotations
public void addAssertMatchesDatasetAnnotations(AssertMatchesDataset[] assertMatchesDatasetAnnotations) Adds the provided 'assertMatchesDatasetAnnotations' to the list ofAssertMatchesDatasetannotations.- Parameters:
assertMatchesDatasetAnnotations- Array ofAssertMatchesDatasetannotations to add to the list.
-
toString
-