Example #1
0
        public void UpdateWithTest()
        {
            var document = new CsvDocument(new string[] { "name", "age" });

            document.WriteWith(new { Name = "Light", Age = "18" });
            document.WriteWith(new { Name = "Misa", Age = "20" });

            document.UpdateWith(1, new { Name = "Misa", Age = 17 });
            Assert.AreEqual(2, document.Count);
        }
Example #2
0
        public void WriteWithTest()
        {
            var document = new CsvDocument(new string[] { "name", "age" });

            document.WriteWith(new { Name = "Light", Age = "18" });
            document.WriteWith(new { Name = "Misa", Age = "20" });

            Assert.IsFalse(document.IsEmpty);
            Assert.AreEqual(2, document.Count);
        }