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
ConstructorDescriptionDefault constructor.MongoUnitAnnotations
(List<SeedWithDataset> seedWithDatasetAnnotations, List<AssertMatchesDataset> assertMatchesDatasetAnnotations) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addAssertMatchesDatasetAnnotation
(AssertMatchesDataset assertMatchesDatasetAnnotation) Adds the provided 'assertMatchesDatasetAnnotation' to the list ofAssertMatchesDataset
annotations.void
addAssertMatchesDatasetAnnotations
(AssertMatchesDataset[] assertMatchesDatasetAnnotations) Adds the provided 'assertMatchesDatasetAnnotations' to the list ofAssertMatchesDataset
annotations.void
addSeedWithDatasetAnnotation
(SeedWithDataset seedWithDatasetAnnotation) Adds the provided 'seedWithDatasetAnnotation' to the list ofSeedWithDataset
annotations.void
addSeedWithDatasetAnnotations
(SeedWithDataset[] seedWithDatasetAnnotations) Adds the provided 'seedWithDatasetAnnotations' to the list ofSeedWithDataset
annotations.void
setAssertMatchesDatasetAnnotations
(List<AssertMatchesDataset> assertMatchesDatasetAnnotations) void
setSeedWithDatasetAnnotations
(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 ofSeedWithDataset
annotations discovered on a test class or method.assertMatchesDatasetAnnotations
- List ofAssertMatchesDataset
annotations discovered on a test class or method.
-
-
Method Details
-
getSeedWithDatasetAnnotations
- Returns:
- seedWithDatasetAnnotations List of
SeedWithDataset
annotations discovered on a test class or method.
-
setSeedWithDatasetAnnotations
- Parameters:
seedWithDatasetAnnotations
- seedWithDatasetAnnotations List ofSeedWithDataset
annotations discovered on a test class or method.
-
getAssertMatchesDatasetAnnotations
- Returns:
- List of
AssertMatchesDataset
annotations discovered on a test class or method.
-
setAssertMatchesDatasetAnnotations
public void setAssertMatchesDatasetAnnotations(List<AssertMatchesDataset> assertMatchesDatasetAnnotations) - Parameters:
assertMatchesDatasetAnnotations
- List ofAssertMatchesDataset
annotations discovered on a test class or method.
-
addSeedWithDatasetAnnotation
Adds the provided 'seedWithDatasetAnnotation' to the list ofSeedWithDataset
annotations.- Parameters:
seedWithDatasetAnnotation
-SeedWithDataset
annotation to add to the list.
-
addSeedWithDatasetAnnotations
Adds the provided 'seedWithDatasetAnnotations' to the list ofSeedWithDataset
annotations.- Parameters:
seedWithDatasetAnnotations
- Array ofSeedWithDataset
annotations to add to the list.
-
addAssertMatchesDatasetAnnotation
Adds the provided 'assertMatchesDatasetAnnotation' to the list ofAssertMatchesDataset
annotations.- Parameters:
assertMatchesDatasetAnnotation
-AssertMatchesDataset
annotation to add to the list.
-
addAssertMatchesDatasetAnnotations
public void addAssertMatchesDatasetAnnotations(AssertMatchesDataset[] assertMatchesDatasetAnnotations) Adds the provided 'assertMatchesDatasetAnnotations' to the list ofAssertMatchesDataset
annotations.- Parameters:
assertMatchesDatasetAnnotations
- Array ofAssertMatchesDataset
annotations to add to the list.
-
toString
-