예제 #1
0
        public void FillTest2()
        {
            string[] data = new string[] { "eins", "zwei" };
            var      rec  = new CsvRecord(2, false, true);

            Assert.AreEqual(2, rec.Count);

            rec.Fill(data);
            CollectionAssert.AreEquivalent(data, rec.ToDictionary().Values);

            rec.Fill(new string[] { "sieben" });

            CollectionAssert.AreEquivalent(new string?[] { "sieben", null }, rec.ToDictionary().Values);
        }
예제 #2
0
        public void FillClearTest()
        {
            string[] data = new string[] { "eins", "zwei" };
            var      rec  = new CsvRecord(2, false, true);

            Assert.AreEqual(2, rec.Count);

            rec.Fill(data);

            CollectionAssert.AreEquivalent(data, rec.ToDictionary().Values);

            rec.Clear();

            Assert.IsTrue(rec.ToDictionary().Values.All(x => x is null));

            Assert.AreEqual(2, rec.Count);
        }
예제 #3
0
        public void FillTest3()
        {
            var rec = new CsvRecord(2, false, true);

            rec.Fill(new string[] { "1", "2", "3" });
        }