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