public void Find_TypeAndParent_ShouldOnlyInclude_ItemWithSpecified_TypeAndParent() { ContentItem root = CreateOneItem <Definitions.PersistableItem>(0, "page", null); ContentItem child1 = CreateOneItem <Definitions.PersistableItem>(0, "page1", root); ContentItem child2 = CreateOneItem <Definitions.PersistablePart>(0, "part2", root); var results = repository.Find(new Parameter("class", "PersistableItem"), new Parameter("Parent", root)); results.Single().ShouldBe(child1); }
public void Find_ByID_Equals() { repository.Find(Parameter.Equal("ID", grandchild1.ID)).Single().ShouldBe(grandchild1); }