Ejemplo n.º 1
0
        public void TestFindFirstRow()
        {
            CSVTable table = LoadTable();

            var firstRow = table.FindFirstRow((row) =>
            {
                var entry = row.GetEntry("id");
                return(entry.content == "10");
            });

            Assert.AreNotEqual(null, firstRow);

            Assert.AreEqual("张三10", firstRow.GetEntry("name").content);
            Assert.AreEqual("110", firstRow.GetEntry("level").content);
            Assert.AreEqual("0", firstRow.GetEntry("gender").content);
            Assert.AreEqual("avatar10", firstRow.GetEntry("model").content);
            Assert.AreEqual("2000", firstRow.GetEntry("goden").content);
            Assert.AreEqual("248.44", firstRow.GetEntry("attack").content);
        }