Example #1
0
 public void FromAllTimeShouldWork()
 {
     var query = new TopicsStatistics(base.connectionString);
     var result = query.Execute();
     result.MostActiveAllTime
         .Satisfy(mostActives => mostActives.Any(ma => ma.Name == "FooTopic" && ma.MessageCount == 3)
                              && mostActives.Any(ma => ma.Name == "BarTopic" && ma.MessageCount == 2));
 }
Example #2
0
 public void WhenCollectionDoesNotExist_ThenReturnEmpty()
 {
     base.mongoDb.DropCollection(MongoDbConstants.Collections.Topics);
     base.mongoDb.DropCollection(MongoDbConstants.Collections.Groups);
     var query = new TopicsStatistics(base.connectionString);
     var result = query.Execute();
     result.MostActiveAllTime.Should().Be.Empty();
 }