// GET: Lore public virtual ActionResult List() { var cmd = new GetTomes(); var tomes = DomainRegistry.Repository.Find(cmd); SetMessages(); return(View(MVC.Admin.Views.Tomes.List, tomes)); }
public void Should_fetch_all_available_tomes() { new TomeBuilder().With(cr => cr.Id, 7) .With(cr => cr.Text, "First Tome") .With(cr => cr.BaseItem, new ItemSourceBuilder().With(cr => cr.Id, 195).BuildAndSave()) .BuildAndSave(); new TomeBuilder().With(cr => cr.Id, 13) .With(cr => cr.Text, "Second Tome") .With(cr => cr.BaseItem, new ItemSourceBuilder().With(cr => cr.Id, 196).BuildAndSave()) .BuildAndSave(); var cmd = new GetTomes(); Assert.That(DomainRegistry.Repository.Find(cmd), Has.Exactly(2).Items); }
public void Should_return_empty_list_if_no_tomes_found() { var cmd = new GetTomes(); Assert.That(DomainRegistry.Repository.Find(cmd), Is.Empty); }