public void GedComComparison_GedcomNoteRecord_IsEquivalentTo_ExpectAreEqual()
        {
            // Arrange
            var object1 = new GedcomNoteRecord();
            var object2 = new GedcomNoteRecord();

            // Act and Assert
            Assert.True(object1.IsEquivalentTo(object2));
            Assert.True(object2.IsEquivalentTo(object1));
        }
        private GedcomIndividualRecord CreateIndividualForNoteTest(string noteText)
        {
            var xrefId = gedcomDb.GenerateXref("NOTE");
            var note   = new GedcomNoteRecord {
                Database = gedcomDb, XRefID = xrefId, Text = noteText
            };

            gedcomDb.Add(xrefId, note);
            var person = gedcomDb.NamedPerson("Mary");

            person.Notes.Add(xrefId);
            return(person);
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="GedcomNoteRecordTest"/> class.
 /// </summary>
 public GedcomNoteRecordTest()
 {
     noteRecord1 = GenerateNoteRecord();
     noteRecord2 = GenerateNoteRecord();
 }
예제 #4
0
		private void DoAddNote(GedcomNoteRecord note)
		{
			if (_record.RecordType != GedcomRecordType.Source || !_dataNotes)
			{
				_record.Notes.Add(note.XRefID);
			}
			else
			{
				GedcomSourceRecord sourceRecord = (GedcomSourceRecord)_record;
				sourceRecord.DataNotes.Add(note.XRefID);
			}
						
			Gtk.TreeIter iter = _model.Append();
			_model.SetValue(iter, 0, note);
			
			NotesTreeView.Selection.SelectIter(iter);	
		}
예제 #5
0
		protected virtual void OnNewNoteButton_Clicked(object sender, System.EventArgs e)
		{
			GedcomNoteRecord note = new GedcomNoteRecord(_database);
			
			DoAddNote(note);
		}