public void HasView_Should_Retun_False_On_Unkown_View() { var cache = new TilesCache(); cache.GuardInit(typeof(TilesViewEngineTest).Assembly); Assert.That(!cache.HasView("wrong")); }
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)); } }
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)); } }
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)); } }
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_Retun_False_On_Unkown_View() { var cache = new TilesCache(); cache.GuardInit(typeof (TilesViewEngineTest).Assembly); Assert.That(!cache.HasView("wrong")); }