public void Should_Return_This() { const string expectedXML = @"<LogicalSchema Version=""1""><DatabaseName>Database1</DatabaseName></LogicalSchema>"; Database db1 = new Database("Database1"); string outputXml = db1.Serialise(new DatabaseSerialisationScheme()); outputXml = XmlSqueezer.RemoveWhitespaceBetweenElements(outputXml); Assert.That(outputXml, Is.EqualTo(expectedXML)); }
private static TimeSpan RunSerialisationTest(int numTables, int numColumns) { IDatabase db = new Database("Test Database", ArchAngel.Providers.EntityModel.Controller.DatabaseLayer.DatabaseTypes.SQLServer2005); SetupDatabase(db, numTables, numColumns); DateTime start = DateTime.Now; db.Serialise(new DatabaseSerialisationScheme()); return DateTime.Now - start; }
public void Should_Return_This() { const string expectedXML = @"<LogicalSchema Version=""1""><DatabaseName>Database1</DatabaseName>" + "<Table><Description /><Enabled>True</Enabled><IsUserDefined>False</IsUserDefined><Name>Table1</Name><UID>00000000-0000-0000-0000-000000000000</UID></Table>" + "<Table><Description /><Enabled>True</Enabled><IsUserDefined>False</IsUserDefined><Name>Table2</Name><UID>00000000-0000-0000-0000-000000000000</UID></Table>" + "</LogicalSchema>"; Database db1 = new Database("Database1"); db1.AddTable(new Table("Table1")); db1.AddTable(new Table("Table2")); string outputXml = db1.Serialise(new DatabaseSerialisationScheme()); outputXml = XmlSqueezer.RemoveWhitespaceBetweenElements(outputXml); Assert.That(outputXml, Is.EqualTo(expectedXML)); }