public void should_serialize_dbml_into_UTF8() { var db = GetNorthwindDatabase(); var xml = DbmlHelper.ToXml(db); Assert.IsTrue(xml.ToUpper().Contains("ENCODING=\"UTF-8\"")); }
private static Database GetNorthwindDatabase() { var xml = File.ReadAllText(TestAssets.DBML_Northwind); var db = DbmlHelper.FromXml(xml); return(db); }
public void should_serialize_dbml_which_can_be_deserialized() { var db = GetNorthwindDatabase(); var xml = DbmlHelper.ToXml(db); var db2 = DbmlHelper.FromXml(xml); Assert.AreEqual(db.Table.Count(), db2.Table.Count()); }
private static void TestManipulator(string testAsset, DbmlManipulatorBase dbmlManipulator, Action <Database> testBefore, Action <Database> testAfter) { var xml = File.ReadAllText(testAsset); var db = DbmlHelper.FromXml(xml); testBefore.Invoke(db); var db2 = dbmlManipulator.Manipulate(db); testAfter.Invoke(db2); }