예제 #1
0
        public void GEDCOMDocument_AddRecords_Exception_If_RecordList_IsNull()
        {
            var document = new GEDCOMDocument();

            //Assert
            Assert.Throws <ArgumentNullException>(() => document.AddRecords(null));
        }
예제 #2
0
        public void GEDCOMDocument_AddRecords_Add_Records_To_Individuals_Collection(int recordCount)
        {
            //Arrange
            var document = new GEDCOMDocument();
            var records  = new GEDCOMRecordList();
            int count    = document.Records.Count;

            for (int i = 1; i <= recordCount; i++)
            {
                records.Add(Util.CreateIndividualRecord(i));
            }

            //Act
            document.AddRecords(records);

            //Assert
            Assert.AreEqual(count + recordCount, document.IndividualRecords.Count);
        }