예제 #1
0
            public void Must_apply_private_client_and_server_cacheability()
            {
                _cachePolicy.PrivateClientCaching(TimeSpan.FromDays(1));
                _cachePolicy.ServerCaching(DateTime.UtcNow);

                _cachePolicy.Apply(_httpCachePolicyBase);

                _httpCachePolicyBase.AssertWasCalled(arg => arg.SetCacheability(HttpCacheability.ServerAndPrivate));
            }
예제 #2
0
            public void Must_have_policy()
            {
                _cachePolicy.PrivateClientCaching(TimeSpan.FromDays(1));

                Assert.That(((ICachePolicy)_cachePolicy).HasPolicy, Is.True);
            }
예제 #3
0
            public void Must_have_policy()
            {
                _cachePolicy.PrivateClientCaching(new DateTime(2012, 1, 1, 0, 0, 0, DateTimeKind.Utc));

                Assert.That(((ICachePolicy)_cachePolicy).HasPolicy, Is.True);
            }