void TestInResponseTo(Note expected, Note not, Note expectedNote) { NoteFilter filter = new NoteFilter(); filter.Asset.Add(SandboxProject); filter.InResponseTo.Add(expectedNote); ResetInstance(); expected = Instance.Get.NoteByID(expected.ID); not = Instance.Get.NoteByID(not.ID); ICollection<Note> results = SandboxProject.GetNotes(filter); Assert.IsTrue(FindRelated(expected, results), "Expected to find Note that matched filter."); Assert.IsFalse(FindRelated(not, results), "Expected to NOT find Note that doesn't match filter."); foreach (Note result in results) Assert.AreEqual(expectedNote, result.InResponseTo); }
/// <summary> /// A collection notes that belong to this base asset filtered by the passed in filter /// </summary> public ICollection<Note> GetNotes(NoteFilter filter) { filter = filter ?? new NoteFilter(); filter.Asset.Clear(); filter.Asset.Add(this); return Instance.Get.Notes(filter); }