프로젝트

일반

사용자정보

통계
| 브랜치(Branch): | 개정판:

markus / ConvertService / ServiceBase / Markus.Service.DataBase.Test / DataBaseServiceproperties.cs @ 30d84e1a

이력 | 보기 | 이력해설 | 다운로드 (1.71 KB)

1 264f0f92 GeunHo Song
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 3fb3351b GeunHo Song
        /// <summary>
14
        /// Get SERVICE_PROPERTIES
15
        /// </summary>
16
        [Test, Description("SERVICEPROPERTIES")]
17
        public void GetServiceProperties()
18 264f0f92 GeunHo Song
        {
19
            using (Markus.Service.DataBase.Repositories.SERVICEPROPERTIESRepository repository = new Repositories.SERVICEPROPERTIESRepository(ConnectionStr, dbtype))
20
            {
21 3fb3351b GeunHo Song
                var sERVICEPROPERTIEs = repository.GetAsync().GetAwaiter().GetResult();
22 264f0f92 GeunHo Song
23 3fb3351b GeunHo Song
                foreach (var serviceproperty in sERVICEPROPERTIEs) {
24
                    Console.WriteLine($"ID : {serviceproperty.ID}");
25 9e974b65 GeunHo Song
                    Assert.Pass(serviceproperty.ID.ToString());
26 3fb3351b GeunHo Song
                    break;
27
                }
28
            }
29
        }
30 264f0f92 GeunHo Song
31 3fb3351b GeunHo Song
        /// <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 9e974b65 GeunHo Song
                    Assert.Pass(serviceproperty.ID);
45 3fb3351b GeunHo Song
                }
46 264f0f92 GeunHo Song
            }
47
        }
48 3fb3351b GeunHo Song
49 264f0f92 GeunHo Song
    }
50
}
클립보드 이미지 추가 (최대 크기: 500 MB)