예제 #1
0
        public void AvrServiceHelperGetAvrServiceQueryResultTest()
        {
            ServiceClientHelper.CallAvrServiceToForceLOHMemoryAllocations();

            CachedQueryResult result = ServiceClientHelper.GetAvrServiceQueryResult(49539640000000, false, string.Empty);

            Assert.IsNotNull(result);
            Assert.IsNotNull(result.QueryTable);
        }
예제 #2
0
        public void DoesCachedQueryExistsTest()
        {
            ServiceClientHelper.CallAvrServiceToForceLOHMemoryAllocations();

            bool exists = ServiceClientHelper.DoesCachedQueryExists(-1, "en", false);

            Assert.IsFalse(exists);

            var queryId = 49539640000000;

            ServiceClientHelper.AvrServiceClearQueryCache(queryId);
            exists = ServiceClientHelper.DoesCachedQueryExists(queryId, ModelUserContext.CurrentLanguage, false);
            Assert.IsFalse(exists);

            CachedQueryResult result = ServiceClientHelper.GetAvrServiceQueryResult(queryId, false, string.Empty);

            Assert.IsNotNull(result);

            exists = ServiceClientHelper.DoesCachedQueryExists(queryId, ModelUserContext.CurrentLanguage, false);
            Assert.IsTrue(exists);
            exists = ServiceClientHelper.DoesCachedQueryExists(queryId, ModelUserContext.CurrentLanguage, true);
            Assert.IsFalse(exists);
        }