예제 #1
0
        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);
        }