1 package dst.ass1.doc.tests;
3 import static org.junit.Assert.assertNotNull;
4 import static org.junit.Assert.assertTrue;
8 import org.bson.Document;
9 import org.junit.ClassRule;
10 import org.junit.Rule;
11 import org.junit.Test;
13 import dst.ass1.doc.EmbeddedMongo;
14 import dst.ass1.doc.MongoService;
15 import dst.ass1.jpa.util.Constants;
17 public class Ass1_4_3_01Test {
20 public static EmbeddedMongo embeddedMongo = new EmbeddedMongo();
23 public MongoService mongo = new MongoService(db -> {
24 db.createCollection(Constants.COLL_MATERIAL_DATA); // make sure the empty collection exists
28 public void getDocumentStatistics_withEmptyData_returnsEmptyStatistics() throws Exception {
29 List<Document> documentStatistics = mongo.getDocumentQuery().getDocumentStatistics();
30 assertNotNull(documentStatistics);
31 assertTrue(documentStatistics.isEmpty());