markus / ConvertService / ServiceBase / Markus.Service.DataBase.Test / DataBaseServiceproperties.cs @ 9e974b65
이력 | 보기 | 이력해설 | 다운로드 (1.71 KB)
1 |
using Dapper; |
---|---|
2 |
using NUnit.Framework; |
3 |
using System; |
4 |
using System.Collections.Generic; |
5 |
|
6 |
namespace Markus.Service.DataBase.Test |
7 |
{ |
8 |
/// <summary> |
9 |
/// PostgreSQL |
10 |
/// </summary> |
11 |
public class DataBaseServiceproperties : TestBaseMSSQL |
12 |
{ |
13 |
/// <summary> |
14 |
/// Get SERVICE_PROPERTIES |
15 |
/// </summary> |
16 |
[Test, Description("SERVICEPROPERTIES")] |
17 |
public void GetServiceProperties() |
18 |
{ |
19 |
using (Markus.Service.DataBase.Repositories.SERVICEPROPERTIESRepository repository = new Repositories.SERVICEPROPERTIESRepository(ConnectionStr, dbtype)) |
20 |
{ |
21 |
var sERVICEPROPERTIEs = repository.GetAsync().GetAwaiter().GetResult(); |
22 |
|
23 |
foreach (var serviceproperty in sERVICEPROPERTIEs) { |
24 |
Console.WriteLine($"ID : {serviceproperty.ID}"); |
25 |
Assert.Pass(serviceproperty.ID.ToString()); |
26 |
break; |
27 |
} |
28 |
} |
29 |
} |
30 |
|
31 |
/// <summary> |
32 |
/// Get SERVICE_PROPERTY |
33 |
/// </summary> |
34 |
[Test, Description("SERVICE_PROPERTY")] |
35 |
public void GetServiceProperty() |
36 |
{ |
37 |
using (Markus.Service.DataBase.Repositories.SERVICEPROPERTIESRepository repository = new Repositories.SERVICEPROPERTIESRepository(ConnectionStr, dbtype)) |
38 |
{ |
39 |
var serviceDatas = repository.GetAsync().GetAwaiter().GetResult(); |
40 |
|
41 |
if(serviceDatas.Count> 0) { |
42 |
var serviceproperty = repository.GetSingleAsync(serviceDatas[0].ID).GetAwaiter().GetResult(); |
43 |
Console.WriteLine($"ID : {serviceproperty.ID}"); |
44 |
Assert.Pass(serviceproperty.ID); |
45 |
} |
46 |
} |
47 |
} |
48 |
|
49 |
} |
50 |
} |