Пример #1
0
        public IReadOnlyList <Match> InsertCache(int sportId, string dateMatch, int status)
        {
            string cacheSortKey           = sortCacheKey + sportId.ToString() + dateMatch + status.ToString();
            IReadOnlyList <Match> matches = matchProvider.GetMatchBySportDateStatus(sportId, dateMatch, status);

            HttpRuntime.Cache.Insert(cacheSortKey, matches, null, DateTime.Now.AddSeconds(30), TimeSpan.Zero);
            return(matches);
        }
Пример #2
0
        public void MatchProvider_GetMatchBySportDateStatus_PassNullDate_CountValue()
        {
            betListProvider.Setup(s => s.GetSports()).Returns(GetSports());
            var actualResult = matchProvider.GetMatchBySportDateStatus(0, "", 0);

            Assert.IsTrue(actualResult.Count == GetMatches().Count);
        }