コード例 #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 AvrServiceHelperGetAvrServicePivotResultTest()
        {
            ServiceClientHelper.CallAvrServiceToForceLOHMemoryAllocations();

            AvrServicePivotResult result = ServiceClientHelper.GetAvrServicePivotResult("xxx", -1);

            Assert.IsNotNull(result);
            Assert.IsNotNull(result.Model);
            Assert.IsNotNull(result.Model.ViewHeader);
            Assert.IsNotNull(result.Model.ViewData);
        }
コード例 #3
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);
        }