Пример #1
0
        public void RootArrayTest()
        {
            var dataSet = Json2DataSetConverter.Convert(Helper.ReadJsonFromFile("test002.json"));

            Assert.AreEqual(1, dataSet.Tables.Count);
            Assert.AreEqual(4, dataSet.Tables["#"].Rows.Count);
        }
Пример #2
0
        public void DefaultBaseTableNameTest()
        {
            var dataSet = Json2DataSetConverter.Convert(Helper.ReadJsonFromFile("test001.json"));

            Assert.AreEqual(1, dataSet.Tables.Count);
            Assert.AreEqual("#", dataSet.Tables[0].TableName);
        }
Пример #3
0
        public void BaseTableNameTest()
        {
            var dataSet = Json2DataSetConverter.Convert(Helper.ReadJsonFromFile("test001.json"),
                                                        new ConvertOptions {
                BaseTableName = "Person"
            });

            Assert.AreEqual(1, dataSet.Tables.Count);
            Assert.AreEqual("Person", dataSet.Tables[0].TableName);
        }