Beispiel #1
0
 public void  GetRaiting()
 {
     var client   = new MongoClient("mongodb://*****:*****@10.10.139.148:27017/gdcame?authSource=gdcame");
     var database = client.GetDatabase("gdcame");
     RatingStatisticsRepository _testStatisticsRating = new RatingStatisticsRepository(database);
     RatingHistoryRepository    _testHistoryRating    = new RatingHistoryRepository(database);
     var receivedData = _testStatisticsRating.GetRaiting(500);
 }
Beispiel #2
0
        public void CleanOldHistory()
        {
            var client   = new MongoClient("mongodb://*****:*****@10.10.139.148:27017/gdcame?authSource=gdcame");
            var database = client.GetDatabase("gdcame");
            RatingHistoryRepository _testHistoryRating = new RatingHistoryRepository(database);
            TimeSpan period = new TimeSpan(1, 0, 0);

            _testHistoryRating.CleanOldHistory(period);
        }
Beispiel #3
0
        public void  ReadHistoryWithUsersIds()
        {
            var client   = new MongoClient("mongodb://*****:*****@10.10.139.148:27017/gdcame?authSource=gdcame");
            var database = client.GetDatabase("gdcame");
            RatingHistoryRepository _testHistoryRating = new RatingHistoryRepository(database);

            string[] userslds = new string[] { "accepted" };
            TimeSpan period   = new TimeSpan(24, 0, 0);
            var      history  = _testHistoryRating.ReadHistoryWithUsersIds(new GetUsersRatingHistoryCriterion()
            {
                UsersIds = userslds, Period = period
            });
        }
Beispiel #4
0
 public void PersistRatingHistory()
 {
     var client   = new MongoClient("mongodb://*****:*****@10.10.139.148:27017/gdcame?authSource=gdcame");
     var database = client.GetDatabase("gdcame");
     RatingStatisticsRepository _testStatisticsRating = new RatingStatisticsRepository(database);
     RatingHistoryRepository    _testHistoryRating    = new RatingHistoryRepository(database);
     RatingHistory ratingHistory = new RatingHistory
     {
         Data             = new DateTime(2016, 11, 28, 12, 25, 25),
         UserId           = "accepted",
         ManualStepsCount = 122,
         RootCounter      = 225,
         TotalEarned      = 928,
     };
     // _testHistoryRating.PersistRatingHistory(ratingHistory);
 }