Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit de0fff5

Browse files
committed
Merge Async Tests into main Test project
1 parent 028d37c commit de0fff5

32 files changed

+115
-675
lines changed

src/ServiceStack.OrmLite.sln

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceStack.OrmLite.Sqlite
8686
EndProject
8787
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceStack.OrmLite.VistaDB.Tests", "ServiceStack.OrmLite.VistaDB.Tests\ServiceStack.OrmLite.VistaDB.Tests.csproj", "{DBD5FF1A-454C-4763-A604-6EBB0C230357}"
8888
EndProject
89-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceStack.OrmLiteV45.Tests", "..\tests\ServiceStack.OrmLiteV45.Tests\ServiceStack.OrmLiteV45.Tests.csproj", "{01ABABFF-FA2C-492A-9217-E83658BF6971}"
90-
EndProject
9189
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ServiceStack.OrmLite.VbNetTests", "..\tests\ServiceStack.OrmLite.VbNetTests\ServiceStack.OrmLite.VbNetTests.vbproj", "{CC385BE2-B49D-46AF-8F1B-BC9943E106E6}"
9290
EndProject
9391
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ServiceStack.OrmLite.SqlServer.Converters", "ServiceStack.OrmLite.SqlServer.Converters\ServiceStack.OrmLite.SqlServer.Converters.csproj", "{7E9BB57B-53E3-425E-9882-B6E078C5C9BA}"
@@ -491,26 +489,6 @@ Global
491489
{DBD5FF1A-454C-4763-A604-6EBB0C230357}.Signed|Mixed Platforms.ActiveCfg = Release|Any CPU
492490
{DBD5FF1A-454C-4763-A604-6EBB0C230357}.Signed|Mixed Platforms.Build.0 = Release|Any CPU
493491
{DBD5FF1A-454C-4763-A604-6EBB0C230357}.Signed|x86.ActiveCfg = Release|Any CPU
494-
{01ABABFF-FA2C-492A-9217-E83658BF6971}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
495-
{01ABABFF-FA2C-492A-9217-E83658BF6971}.Debug|Any CPU.Build.0 = Debug|Any CPU
496-
{01ABABFF-FA2C-492A-9217-E83658BF6971}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
497-
{01ABABFF-FA2C-492A-9217-E83658BF6971}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
498-
{01ABABFF-FA2C-492A-9217-E83658BF6971}.Debug|x86.ActiveCfg = Debug|Any CPU
499-
{01ABABFF-FA2C-492A-9217-E83658BF6971}.Default|Any CPU.ActiveCfg = Debug|Any CPU
500-
{01ABABFF-FA2C-492A-9217-E83658BF6971}.Default|Any CPU.Build.0 = Debug|Any CPU
501-
{01ABABFF-FA2C-492A-9217-E83658BF6971}.Default|Mixed Platforms.ActiveCfg = Debug|Any CPU
502-
{01ABABFF-FA2C-492A-9217-E83658BF6971}.Default|Mixed Platforms.Build.0 = Debug|Any CPU
503-
{01ABABFF-FA2C-492A-9217-E83658BF6971}.Default|x86.ActiveCfg = Debug|Any CPU
504-
{01ABABFF-FA2C-492A-9217-E83658BF6971}.Release|Any CPU.ActiveCfg = Release|Any CPU
505-
{01ABABFF-FA2C-492A-9217-E83658BF6971}.Release|Any CPU.Build.0 = Release|Any CPU
506-
{01ABABFF-FA2C-492A-9217-E83658BF6971}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
507-
{01ABABFF-FA2C-492A-9217-E83658BF6971}.Release|Mixed Platforms.Build.0 = Release|Any CPU
508-
{01ABABFF-FA2C-492A-9217-E83658BF6971}.Release|x86.ActiveCfg = Release|Any CPU
509-
{01ABABFF-FA2C-492A-9217-E83658BF6971}.Signed|Any CPU.ActiveCfg = Release|Any CPU
510-
{01ABABFF-FA2C-492A-9217-E83658BF6971}.Signed|Any CPU.Build.0 = Release|Any CPU
511-
{01ABABFF-FA2C-492A-9217-E83658BF6971}.Signed|Mixed Platforms.ActiveCfg = Release|Any CPU
512-
{01ABABFF-FA2C-492A-9217-E83658BF6971}.Signed|Mixed Platforms.Build.0 = Release|Any CPU
513-
{01ABABFF-FA2C-492A-9217-E83658BF6971}.Signed|x86.ActiveCfg = Release|Any CPU
514492
{CC385BE2-B49D-46AF-8F1B-BC9943E106E6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
515493
{CC385BE2-B49D-46AF-8F1B-BC9943E106E6}.Debug|Any CPU.Build.0 = Debug|Any CPU
516494
{CC385BE2-B49D-46AF-8F1B-BC9943E106E6}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU

tests/ServiceStack.OrmLiteV45.Tests/ApiMySqlTestsAsync.cs renamed to tests/ServiceStack.OrmLite.Tests/Async/ApiMySqlTestsAsync.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using NUnit.Framework;
55
using ServiceStack.OrmLite.Tests.Shared;
66

7-
namespace ServiceStack.OrmLite.Tests
7+
namespace ServiceStack.OrmLite.Tests.Async
88
{
99
public class ApiMySqlTestsAsync
1010
: OrmLiteTestBase

tests/ServiceStack.OrmLiteV45.Tests/ApiPostgreSqlTestsAsync.cs renamed to tests/ServiceStack.OrmLite.Tests/Async/ApiPostgreSqlTestsAsync.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using NUnit.Framework;
55
using ServiceStack.OrmLite.Tests.Shared;
66

7-
namespace ServiceStack.OrmLite.Tests
7+
namespace ServiceStack.OrmLite.Tests.Async
88
{
99
public class ApiPostgreSqlTestsAsync
1010
: OrmLiteTestBase

tests/ServiceStack.OrmLiteV45.Tests/ApiSqlServerTestsAsync.cs renamed to tests/ServiceStack.OrmLite.Tests/Async/ApiSqlServerTestsAsync.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using NUnit.Framework;
55
using ServiceStack.OrmLite.Tests.Shared;
66

7-
namespace ServiceStack.OrmLite.Tests
7+
namespace ServiceStack.OrmLite.Tests.Async
88
{
99
public class ApiSqlServerTestsAsync
1010
: OrmLiteTestBase

tests/ServiceStack.OrmLiteV45.Tests/ApiSqliteTestsAsync.cs renamed to tests/ServiceStack.OrmLite.Tests/Async/ApiSqliteTestsAsync.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
using NUnit.Framework;
55
using ServiceStack.OrmLite.Tests.Shared;
66

7-
namespace ServiceStack.OrmLite.Tests
7+
namespace ServiceStack.OrmLite.Tests.Async
88
{
99
public class ApiSqliteTestsAsync
1010
: OrmLiteTestBase

tests/ServiceStack.OrmLiteV45.Tests/AsyncTests.cs renamed to tests/ServiceStack.OrmLite.Tests/Async/AsyncTests.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
using ServiceStack.OrmLite.Tests.Shared;
1010

11-
namespace ServiceStack.OrmLite.Tests
11+
namespace ServiceStack.OrmLite.Tests.Async
1212
{
1313
[TestFixture]
1414
public class AsyncTests
@@ -23,7 +23,7 @@ public async Task Can_Insert_and_SelectAsync()
2323

2424
for (var i = 0; i < 3; i++)
2525
{
26-
await db.InsertAsync(new Poco { Name = ((char)('A' + i)).ToString() });
26+
await db.InsertAsync(new Poco { Id = i + 1, Name = ((char)('A' + i)).ToString() });
2727
}
2828

2929
var results = (await db.SelectAsync<Poco>()).Map(x => x.Name);
@@ -108,7 +108,7 @@ public async Task Test_Thread_Affinity()
108108
var db = OpenDbConnection();
109109

110110
"Root: {0}".Print(Thread.CurrentThread.ManagedThreadId);
111-
var task = Task.Factory.StartNew(() =>
111+
var task = Task.Factory.StartNew(() =>
112112
{
113113
"Before Delay: {0}".Print(Thread.CurrentThread.ManagedThreadId);
114114
return Task.Delay(delayMs);
@@ -122,7 +122,8 @@ public async Task Test_Thread_Affinity()
122122
{
123123
"Before SQL: {0}".Print(Thread.CurrentThread.ManagedThreadId);
124124
await db.ExistsAsync<Person>(x => x.Age < 50)
125-
.Then(t1 => {
125+
.Then(t1 =>
126+
{
126127
"After SQL: {0}".Print(Thread.CurrentThread.ManagedThreadId);
127128
return Task.Delay(delayMs);
128129
});

tests/ServiceStack.OrmLiteV45.Tests/AutoQueryTestsAsync.cs renamed to tests/ServiceStack.OrmLite.Tests/Async/AutoQueryTestsAsync.cs

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -5,53 +5,8 @@
55
using ServiceStack.DataAnnotations;
66
using ServiceStack.Text;
77

8-
namespace ServiceStack.OrmLite.Tests
8+
namespace ServiceStack.OrmLite.Tests.Async
99
{
10-
public class Rockstar
11-
{
12-
public int Id { get; set; }
13-
public string FirstName { get; set; }
14-
public string LastName { get; set; }
15-
public int? Age { get; set; }
16-
public DateTime DateOfBirth { get; set; }
17-
public DateTime? DateDied { get; set; }
18-
public LivingStatus LivingStatus { get; set; }
19-
}
20-
21-
public class RockstarAlt
22-
{
23-
public int Id { get; set; }
24-
public string FirstName { get; set; }
25-
public string LastName { get; set; }
26-
public int? Age { get; set; }
27-
}
28-
29-
public enum LivingStatus
30-
{
31-
Alive,
32-
Dead
33-
}
34-
35-
public class DeptEmployee
36-
{
37-
[PrimaryKey]
38-
public int Id { get; set; }
39-
public string FirstName { get; set; }
40-
public string LastName { get; set; }
41-
[References(typeof(Department2))]
42-
public int DepartmentId { get; set; }
43-
44-
[Reference]
45-
public Department2 Department { get; set; }
46-
}
47-
48-
public class Department2
49-
{
50-
[PrimaryKey]
51-
public int Id { get; set; }
52-
public string Name { get; set; }
53-
}
54-
5510
public class AutoQueryTestsAsync : OrmLiteTestBase
5611
{
5712
public static Rockstar[] SeedRockstars = new[] {

tests/ServiceStack.OrmLiteV45.Tests/CustomSqlTestsAsync.cs renamed to tests/ServiceStack.OrmLite.Tests/Async/CustomSqlTestsAsync.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using NUnit.Framework;
44
using ServiceStack.DataAnnotations;
55

6-
namespace ServiceStack.OrmLite.Tests
6+
namespace ServiceStack.OrmLite.Tests.Async
77
{
88
public class LetterFrequency
99
{

tests/ServiceStack.OrmLiteV45.Tests/Issues/LoadSelectAmbiguousColumnIssue.cs renamed to tests/ServiceStack.OrmLite.Tests/Async/Issues/LoadSelectAmbiguousColumnIssue.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
using ServiceStack.Model;
66
using ServiceStack.Text;
77

8-
namespace ServiceStack.OrmLite.Tests.Issues
8+
namespace ServiceStack.OrmLite.Tests.Async.Issues
99
{
1010
//[Schema("dbo")]
1111
[Alias("Project")]

tests/ServiceStack.OrmLiteV45.Tests/Issues/PredicateBuilderIssue.cs renamed to tests/ServiceStack.OrmLite.Tests/Async/Issues/PredicateBuilderIssue.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
using System.Threading.Tasks;
22
using NUnit.Framework;
33

4-
namespace ServiceStack.OrmLite.Tests.Issues
4+
namespace ServiceStack.OrmLite.Tests.Async.Issues
55
{
66
public class PredicateBuilderIssue : OrmLiteTestBase
77
{

0 commit comments

Comments
 (0)