示例#1
0
        public void TestFindLastRow()
        {
            CSVTable table = LoadTable();

            var lastRow = table.FindLastRow((row) =>
            {
                var entry = row.GetEntry("gender");
                return(entry.content == "0");
            });

            Assert.AreNotEqual(null, lastRow);

            Assert.AreEqual("24", lastRow.GetEntry("id").content);
            Assert.AreEqual("张三24", lastRow.GetEntry("name").content);
            Assert.AreEqual("124", lastRow.GetEntry("level").content);
            Assert.AreEqual("0", lastRow.GetEntry("gender").content);
            Assert.AreEqual("avatar24", lastRow.GetEntry("model").content);
            Assert.AreEqual("2000", lastRow.GetEntry("goden").content);
            Assert.AreEqual("249.84", lastRow.GetEntry("attack").content);
        }