public void HasView_Should_Retun_False_On_Unkown_View()
        {
            var cache = new TilesCache();

            cache.GuardInit(typeof(TilesViewEngineTest).Assembly);
            Assert.That(!cache.HasView("wrong"));
        }
Exemple #2
0
 public void HasView_Should_Be_Based_On_Cache()
 {
     var cache = new TilesCache();
     cache.GuardInit(typeof (TilesViewEngineTest).Assembly);
     foreach (ITile tile in cache.Cache.Tiles)
     {
         Assert.That(cache.HasView(tile.Name));
     }
 }
Exemple #3
0
 public void GetView_Should_Be_Based_On_Cache()
 {
     var cache = new TilesCache();
     cache.GuardInit(typeof (TilesViewEngineTest).Assembly);
     foreach (ITile tile in cache.Cache.Tiles)
     {
         Console.WriteLine(tile.Name);
         Assert.That(cache.GetView(tile.Name), Is.SameAs(tile));
     }
 }
        public void TestInit()
        {
            var cache = new TilesCache();

            Assert.That(cache.Cache, Is.Null);
            cache.GuardInit(typeof(TilesViewEngineTest).Assembly);
            Assert.That(cache.Cache.Contains("Index"));
            Assert.That(cache.Cache.Contains("Other"));
            Assert.That(cache.Cache.Contains("Alt"));
        }
        public void HasView_Should_Be_Based_On_Cache()
        {
            var cache = new TilesCache();

            cache.GuardInit(typeof(TilesViewEngineTest).Assembly);
            foreach (ITile tile in cache.Cache.Tiles)
            {
                Assert.That(cache.HasView(tile.Name));
            }
        }
        public void GetView_Should_Be_Based_On_Cache()
        {
            var cache = new TilesCache();

            cache.GuardInit(typeof(TilesViewEngineTest).Assembly);
            foreach (ITile tile in cache.Cache.Tiles)
            {
                Console.WriteLine(tile.Name);
                Assert.That(cache.GetView(tile.Name), Is.SameAs(tile));
            }
        }
Exemple #7
0
 public void GetView_Should_Retun_False_On_Unkown_View()
 {
     var cache = new TilesCache();
     cache.GuardInit(typeof (TilesViewEngineTest).Assembly);
     try
     {
         cache.GetView("wrong");
         Assert.Fail("Expected exception");
     }
     catch (TemplateException e)
     {
         Assert.That(e.HttpErrorCode, Is.EqualTo(404));
     }
 }
        public void GetView_Should_Retun_False_On_Unkown_View()
        {
            var cache = new TilesCache();

            cache.GuardInit(typeof(TilesViewEngineTest).Assembly);
            try
            {
                cache.GetView("wrong");
                Assert.Fail("Expected exception");
            }
            catch (TemplateException e)
            {
                Assert.That(e.HttpErrorCode, Is.EqualTo(404));
            }
        }
Exemple #9
0
 public void TestInit()
 {
     var cache = new TilesCache();
     Assert.That(cache.Cache, Is.Null);
     cache.GuardInit(typeof (TilesViewEngineTest).Assembly);
     Assert.That(cache.Cache.Contains("Index"));
     Assert.That(cache.Cache.Contains("Other"));
     Assert.That(cache.Cache.Contains("Alt"));
 }
Exemple #10
0
 public void HasView_Should_Retun_False_On_Unkown_View()
 {
     var cache = new TilesCache();
     cache.GuardInit(typeof (TilesViewEngineTest).Assembly);
     Assert.That(!cache.HasView("wrong"));
 }