Exemple #1
0
        public void HasView_Should_Use_PostFix()
        {
            NstlCache.PostFix = ".htm";
            //Given
            var cache = new NstlCache();
            cache.GuardInit(typeof(TilesViewEngineTest).Assembly);
            Assert.That(cache.Factory.Handle("mvc_Index.htm", true), Is.Not.Null);
            Assert.That(!cache.Pages.Contains("mvc_Index.htm"));

            //Then
            Assert.That(cache.HasView("mvc_Index"));
        }
Exemple #2
0
        public void HasView_Should_Retun_False_On_Unkown_View()
        {
            //Given
            var cache = new NstlCache();
            cache.GuardInit(typeof (TilesViewEngineTest).Assembly);
            Assert.That(cache.Factory.Handle("Wrong.htm", false), Is.Null);
            Assert.That(!cache.Pages.Contains("Wrong.htm"));

            //Then
            Assert.That(!cache.HasView("Wrong"));
        }