Uses of Class
org.mongounit.MongoUnitException
Packages that use MongoUnitException
-
Uses of MongoUnitException in org.mongounit
Methods in org.mongounit that throw MongoUnitExceptionModifier and TypeMethodDescriptionstatic AssertionResultMongoUnitUtil.assertMatches(Map<String, Object> expectedDocument, Map<String, Object> actualDocument, MongoUnitProperties mongoUnitProperties) Returns anAssertionResultwith a 'match' of 'true' if the provided 'expectedDocument' and 'actualDocument' match according to the MongoUnit framework rules, or with 'false' otherwise.static AssertionResultMongoUnitUtil.assertMatches(MongoUnitCollection expected, MongoUnitCollection actual, MongoUnitProperties mongoUnitProperties) Returns AnAssertionResultwith a 'match' of 'true' if the provided 'expected' and 'actual'MongoUnitCollections match according to the MongoUnit framework rules, or with 'false' otherwise.static voidMongoUnit.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 voidMongoUnit.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 voidMongoUnit.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 voidMongoUnit.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 voidMongoUnit.assertMatchesEmptyDataset()Assert database is empty.static AssertionResultMongoUnitUtil.assertMatchesMongoUnitValue(Map<String, Object> expectedMongoUnitValue, Object actualValue, String fieldNameIndicator) ReturnsAssertionResultwith a 'match' of 'true' if the provided 'expectedValue' and 'actualValue' match according to the MongoUnit framework rules, or with 'false' otherwise.static AssertionResultMongoUnitUtil.assertMatchesValue(Object expectedValue, Object actualValue, MongoUnitProperties mongoUnitProperties) static MongoUnitDatasetsMongoUnitUtil.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 MongoUnitValueMongoUnitUtil.extractMongoUnitValue(Map<String, Object> mongoUnitValueDocument, String fieldNameIndicator) static StringMongoUnitUtil.extractTestClassName(Class<?> testClass) static List<MongoUnitCollection> MongoUnit.loadDatasetFromLocation(String location, Class<?> testClass) Returns a list ofMongoUnitCollections 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 ofMongoUnitCollections 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 ofMongoUnitCollections 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 ofMongoUnitCollections based on the data pointed to by provided 'fileLocations'.static StringMongoUnitUtil.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 voidMongoUnitUtil.toDatabase(List<MongoUnitCollection> mongoUnitCollections, com.mongodb.client.MongoDatabase mongoDatabase, MongoUnitProperties mongoUnitProperties) Seeds an existing database provided by 'mongoDatabase' with dataset represented in theMongoUnitCollections schema by the provided 'jsonMongoUnitCollections'.static List<MongoUnitCollection> MongoUnitUtil.toMongoUnitTypedCollectionsFromJson(String jsonMongoUnitCollections) -
Uses of MongoUnitException in org.mongounit.config
Methods in org.mongounit.config that throw MongoUnitExceptionModifier and TypeMethodDescriptionstatic com.mongodb.MongoClientURIMongoUnitConfigurationUtil.generateNewMongoClientURI(String baseUri, boolean baseUriKeepAsIs, String timeZoneId)