Package org.mongounit.model
Class MongoUnitDatasets
java.lang.Object
org.mongounit.model.MongoUnitDatasets
MongoUnitDatasets
class contains seed and assert datasets.-
Constructor Summary
ConstructorDescriptionDefault constructor.MongoUnitDatasets
(List<MongoUnitCollection> seedWithDatasets, List<MongoUnitCollection> assertMatchesDatasets, boolean assertAnnotationPresent) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
setAssertAnnotationPresent
(boolean assertAnnotationPresent) void
setAssertMatchesDatasets
(List<MongoUnitCollection> assertMatchesDatasets) void
setSeedWithDatasets
(List<MongoUnitCollection> seedWithDatasets) toString()
-
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 ifAssertMatchesDataset
annotation has been encountered, i.e., the 'assertMatchesDatasets' should actually be used to assert matches, as opposed to having 'assertMatchesDatasets' only there fromSeedWithDataset
with 'reuseForAssertion = true'.
-
-
Method Details
-
getSeedWithDatasets
- Returns:
- Datasets to seed the database with.
-
setSeedWithDatasets
- Parameters:
seedWithDatasets
- Datasets to seed the database with.
-
getAssertMatchesDatasets
- Returns:
- Datasets to verify matching with.
-
setAssertMatchesDatasets
- 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 fromSeedWithDataset
with 'reuseForAssertion = true'.
-
setAssertAnnotationPresent
public void setAssertAnnotationPresent(boolean assertAnnotationPresent) - Parameters:
assertAnnotationPresent
- Flag to indicate ifAssertMatchesDataset
annotation has been encountered, i.e., the 'assertMatchesDatasets' should actually be used to assert matches, as opposed to having 'assertMatchesDatasets' only there fromSeedWithDataset
with 'reuseForAssertion = true'.
-
toString
-