-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathConnectionTest.cs
More file actions
40 lines (34 loc) · 1.02 KB
/
ConnectionTest.cs
File metadata and controls
40 lines (34 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Data;
using DirectSQL.SqlLite;
using System.Threading.Tasks;
namespace TestSqlLiteDatabase
{
[TestClass]
public class ConnectionTest
{
[TestMethod]
public void TestConnect()
{
SqlLiteDatabase db = new SqlLiteDatabase("Data Source=:memory:");
db
.Process((connection) => {})
.Process((connection, transaction) => {} );
}
[TestMethod]
public async Task TestConnectAsync()
{
SqlLiteDatabase db = new SqlLiteDatabase("Data Source=:memory:");
await
( await db.ProcessAsync(
async (connection) => {
await Task.Delay(1); //Dummy code to resolve warning in build.
})
)
.ProcessAsync(
async (connection, transaction) =>{
await Task.Delay(1); //Dummy code to resolve warning in build.
});
}
}
}