Пример #1
0
 public void InfoTest()
 {
     DatasetSchema target = new DatasetSchema(); // TODO: Initialize to an appropriate value
     List<string> expected = new List<string>(); // TODO: Initialize to an appropriate value
     List<string> actual;
     target.Info = expected;
     actual = target.Info;
     Assert.AreEqual(expected, actual);
 }
Пример #2
0
        private DatasetSchema GetSchema(DataSet ds)
        {
            if (ds == null) return null;

            DatasetSchema m = new DatasetSchema();
            m.Info = new List<string>();
            m.Name = ds.DataSetName;

            foreach (DataTable t in ds.Tables)
            {
                foreach (DataColumn c in t.Columns)
                {
                    m.Info.Add(t.TableName);
                    m.Info.Add(c.ColumnName);
                    m.Info.Add(c.DataType.ToString());
                }
            }
            // FEATURE : serialize relations and constraints here

            return m;
        }
Пример #3
0
 public void NameTest()
 {
     DatasetSchema target = new DatasetSchema(); // TODO: Initialize to an appropriate value
     string expected = "test"; // TODO: Initialize to an appropriate value
     string actual;
     target.Name = expected;
     actual = target.Name;
     Assert.AreEqual(expected, actual);
 }
Пример #4
0
 public void DatasetSchemaConstructorTest()
 {
     DatasetSchema target = new DatasetSchema();
     Assert.IsNotNull(target);
 }