Uses of Class
org.mongounit.MongoUnitException
-
Uses of MongoUnitException in org.mongounit
Modifier and TypeMethodDescriptionstatic AssertionResult
MongoUnitUtil.assertMatches
(Map<String, Object> expectedDocument, Map<String, Object> actualDocument, MongoUnitProperties mongoUnitProperties) Returns anAssertionResult
with a 'match' of 'true' if the provided 'expectedDocument' and 'actualDocument' match according to the MongoUnit framework rules, or with 'false' otherwise.static AssertionResult
MongoUnitUtil.assertMatches
(MongoUnitCollection expected, MongoUnitCollection actual, MongoUnitProperties mongoUnitProperties) Returns AnAssertionResult
with a 'match' of 'true' if the provided 'expected' and 'actual'MongoUnitCollection
s match according to the MongoUnit framework rules, or with 'false' otherwise.static void
MongoUnit.assertMatchesDataset
(String[] locations, Class<?> testClass) Asserts that whatever is currently in the database connected to by the MongoUnit framework matches the JSON datasets contained in files pointed to by the provided 'locations' array of paths.static void
MongoUnit.assertMatchesDataset
(String[] locations, LocationType locationType, Class<?> relativePackageClass) Asserts that whatever is currently in the database connected to by the MongoUnit framework matches the JSON datasets contained in files pointed to by the provided 'locations' array of paths.static void
MongoUnit.assertMatchesDataset
(String location, Class<?> testClass) Asserts that whatever is currently in the database connected to by the MongoUnit framework matches the JSON datasets contained in files pointed to by the provided 'location' path.static void
MongoUnit.assertMatchesDataset
(List<MongoUnitCollection> expectedDatasets) Asserts that whatever is currently in the database connected to by the MongoUnit framework matches the dataset collectively contained in the provided 'datasets'.static void
MongoUnit.assertMatchesEmptyDataset()
Assert database is empty.static AssertionResult
MongoUnitUtil.assertMatchesMongoUnitValue
(Map<String, Object> expectedMongoUnitValue, Object actualValue, String fieldNameIndicator) ReturnsAssertionResult
with a 'match' of 'true' if the provided 'expectedValue' and 'actualValue' match according to the MongoUnit framework rules, or with 'false' otherwise.static AssertionResult
MongoUnitUtil.assertMatchesValue
(Object expectedValue, Object actualValue, MongoUnitProperties mongoUnitProperties) static MongoUnitDatasets
MongoUnitUtil.extractMongoUnitDatasets
(org.junit.jupiter.api.extension.ExtensionContext context, String testClassName, boolean classLevel) Extracts MongoUnit datasets based on the potential class or method level MongoUnit annotations.static MongoUnitValue
MongoUnitUtil.extractMongoUnitValue
(Map<String, Object> mongoUnitValueDocument, String fieldNameIndicator) static String
MongoUnitUtil.extractTestClassName
(Class<?> testClass) static List
<MongoUnitCollection> MongoUnit.loadDatasetFromLocation
(String location, Class<?> testClass) Returns a list ofMongoUnitCollection
s that represent the JSON-based data pointed to by the provided 'locations' array of paths.static List
<MongoUnitCollection> MongoUnit.loadDatasetFromLocations
(String[] locations, Class<?> testClass) Returns a list ofMongoUnitCollection
s that represent the JSON-based data pointed to by the provided 'locations' array of paths.static List
<MongoUnitCollection> MongoUnit.loadDatasetFromLocations
(String[] locations, LocationType locationType, Class<?> relativePackageClass) Returns a list ofMongoUnitCollection
s that represent the JSON-based data pointed to by the provided 'locations' array of paths.static List
<MongoUnitCollection> MongoUnitUtil.retrieveDatasetFromLocations
(String[] fileLocations, LocationType locationType, Class<?> relativePackageClass, String testClassName) Returns List ofMongoUnitCollection
s based on the data pointed to by provided 'fileLocations'.static String
MongoUnitUtil.retrieveResourceFromFile
(String location, LocationType locationType, Class<?> relativePackageClass, String testClassName) static List
<MongoUnitCollection> MongoUnit.seedWithDataset
(String[] locations, LocationType locationType, Class<?> relativePackageClass) Seeds the database with the JSON-based datasets pointed to by the provided 'locations' path array.static void
MongoUnitUtil.toDatabase
(List<MongoUnitCollection> mongoUnitCollections, com.mongodb.client.MongoDatabase mongoDatabase, MongoUnitProperties mongoUnitProperties) Seeds an existing database provided by 'mongoDatabase' with dataset represented in theMongoUnitCollection
s schema by the provided 'jsonMongoUnitCollections'.static List
<MongoUnitCollection> MongoUnitUtil.toMongoUnitTypedCollectionsFromJson
(String jsonMongoUnitCollections) -
Uses of MongoUnitException in org.mongounit.config
Modifier and TypeMethodDescriptionstatic com.mongodb.MongoClientURI
MongoUnitConfigurationUtil.generateNewMongoClientURI
(String baseUri, boolean baseUriKeepAsIs, String timeZoneId)