コード例 #1
0
        public void CsvFileCopyTo()
        {
            var test = new CsvFile();

            m_CsvFile.CopyTo(test);
            m_CsvFile.AllPropertiesEqual(test);
            // Test Properties that are not tested
            Assert.AreEqual(m_CsvFile.MappingCollection.Count, test.MappingCollection.Count, "FieldMapping");
            Assert.AreEqual(TrimmingOption.Unquoted, test.TrimmingOption, "TrimmingOption");
            Assert.IsTrue(m_CsvFile.MappingCollection.CollectionEqualWithOrder(test.MappingCollection), "Mapping");
            Assert.IsTrue(m_CsvFile.ColumnCollection.CollectionEqualWithOrder(test.ColumnCollection), "ColumnCollection");
            Assert.IsTrue(m_CsvFile.FileFormat.Equals(test.FileFormat), "FileFormat");
            Assert.IsTrue(test.Equals(m_CsvFile), "Equals");
        }
コード例 #2
0
        public void ColumnFormat()
        {
            var target = new CsvFile();

            m_ValidSetting.CopyTo(target);

            Assert.IsNotNull(target.GetColumn("Score"));
            var cf = target.GetColumn("Score");

            Assert.AreEqual(cf.Name, "Score");

            // Remove the one filed
            target.Column.Remove(target.GetColumn("Score"));
            Assert.IsNull(target.GetColumn("Score"));
        }