You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
958 B
C#
38 lines
958 B
C#
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
|
|
namespace System.Data.Jet.Test
|
|
{
|
|
[TestClass]
|
|
public class DdlTest
|
|
{
|
|
private const string StoreName = nameof(DdlTest) + ".accdb";
|
|
|
|
private JetConnection _connection;
|
|
|
|
[TestInitialize]
|
|
public void Setup()
|
|
{
|
|
_connection = Helpers.CreateAndOpenDatabase(StoreName);
|
|
}
|
|
|
|
[TestCleanup]
|
|
public void TearDown()
|
|
{
|
|
_connection?.Close();
|
|
Helpers.DeleteDatabase(StoreName);
|
|
}
|
|
|
|
[TestMethod]
|
|
public void CheckIfTablesExists()
|
|
{
|
|
var queries = Helpers.GetQueries(Properties.Resources.CheckIfTableExistsTestQueries);
|
|
|
|
Helpers.Execute(_connection, queries[0]);
|
|
|
|
var exists = _connection.TableExists("CheckIfTableExistsTable");
|
|
Assert.IsTrue(exists);
|
|
|
|
Helpers.Execute(_connection, queries[1]);
|
|
}
|
|
}
|
|
} |