Registry / database / fongo
library2.1.1javamavenunverified

Fake in-memory MongoDB implementation for testing Java applications without a real MongoDB server.

<dependency> <groupId>com.github.fakemongo</groupId> <artifactId>fongo</artifactId> <version>2.1.1</version> </dependency>
INSTALL
IMPORT
SIG · FONGO
F
fongo
databasejavav2.1.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Fongo
com.github.fakemongo.Fongo

Creates an in-memory MongoDB instance and retrieves a database.

import com.github.fakemongo.Fongo; import com.mongodb.client.MongoDatabase; public class Example { public static void main(String[] args) { Fongo fongo = new Fongo("test"); MongoDatabase db = fongo.getDatabase("mydb"); System.out.println(db.getName()); } }
Debug
Known issues
gotchaFongo does not support all MongoDB features; some queries may behave differently.
fix
Review the Fongo documentation for unsupported features and adjust tests accordingly.
affects: all
Upgrade
Version history
2.1.1latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
fongo — mvn dependency:get fongo · libregistry