public void CreateConnectionTest() { SqlCeConnection expected = new SqlCeConnection("Data Source = PTDatabase.sdf"); SqlCeConnection actual = PTDatabase.Connection(); SqlCeConnectionEqual(expected, actual); }
public void CreateConnectionWithFilePathTest() { var sdfPath = "PTDatabase.sdf"; SqlCeConnection expectedConnection = new SqlCeConnection("Data Source = " + sdfPath); bool expected = true; bool created = PTDatabase.CreateConnectionWithSDFFile(sdfPath); SqlCeConnection actualConnction = PTDatabase.Connection(); Assert.AreEqual(expected, created); Assert.AreEqual(expected, File.Exists(sdfPath)); SqlCeConnectionEqual(expectedConnection, actualConnction); }