public void Test_Common2() { using (GDMNoteRecord noteRec = new GDMNoteRecord(null)) { noteRec.AddNoteText("text"); Assert.AreEqual("text", noteRec.Lines.Text.Trim()); Assert.Throws(typeof(ArgumentNullException), () => { noteRec.SetNoteText(null); }); noteRec.SetNoteText("Test text"); Assert.AreEqual("Test text", noteRec.Lines.Text.Trim()); using (GDMNoteRecord noteRec2 = new GDMNoteRecord(null)) { noteRec2.SetNoteText("Test text"); Assert.AreEqual("Test text", noteRec2.Lines.Text.Trim()); Assert.AreEqual(100.0f, noteRec.IsMatch(noteRec2, new MatchParams())); Assert.IsFalse(noteRec2.IsEmpty()); noteRec2.Clear(); Assert.IsTrue(noteRec2.IsEmpty()); Assert.AreEqual(0.0f, noteRec.IsMatch(noteRec2, new MatchParams())); Assert.AreEqual(0.0f, noteRec.IsMatch(null, new MatchParams())); } Assert.Throws(typeof(ArgumentException), () => { noteRec.MoveTo(null, false); }); using (GDMNoteRecord noteRec3 = new GDMNoteRecord(null)) { noteRec3.SetNoteText("Test text 3"); Assert.AreEqual("Test text 3", noteRec3.Lines.Text.Trim()); noteRec.MoveTo(noteRec3, false); Assert.AreEqual("Test text 3", noteRec3.Lines.Text.Trim()); } } }
public void Test_IsMatch3() { var matchParams = new MatchParams(); GDMNoteRecord instance1 = new GDMNoteRecord(null); instance1.ParseString("This is a test"); GDMNoteRecord instance2 = new GDMNoteRecord(null); instance2.ParseString("This is a test"); float result = instance1.IsMatch(instance2, matchParams); // TODO matchParams is not used Assert.AreEqual(100.0F, result, 0.0); }