public void CanConnectToSqlServerCeDatabase() { using (TestResourceFile dbFile = new TestResourceFile(this, "Datastore.sdf")) { using (SmartClientDatabase database = DatabaseFactory.CreateDatabase() as SmartClientDatabase) { DbConnection connection = database.GetConnection(); Assert.IsNotNull(connection); Assert.IsTrue(connection is SqlCeConnection); Assert.IsTrue(connection.State == ConnectionState.Open); connection.Close(); } } }