markus / ConvertService / ServiceBase / Markus.Service.DataBase.Test / DataBaseDocumentitemPG.cs @ 30d84e1a
이력 | 보기 | 이력해설 | 다운로드 (1.8 KB)
1 | 264f0f92 | GeunHo Song | using NUnit.Framework; |
---|---|---|---|
2 | using System; |
||
3 | using System.Collections.Generic; |
||
4 | |||
5 | namespace Markus.Service.DataBase.Test |
||
6 | { |
||
7 | public class DataBaseDocumentitemPG : TestBasePG |
||
8 | { |
||
9 | d85fc490 | GeunHo Song | [Test, Description("GetDocumentFirstAsync")] |
10 | public void GetDocumentFirstAsync() |
||
11 | 264f0f92 | GeunHo Song | { |
12 | d85fc490 | GeunHo Song | using (Markus.Service.DataBase.Repositories.DOCUMENTITEMRepository repository = new Repositories.DOCUMENTITEMRepository(ConnectionStr, dbtype)) |
13 | 264f0f92 | GeunHo Song | { |
14 | d85fc490 | GeunHo Song | var result = repository.GetFirstAsync("000000", "4000005").GetAwaiter().GetResult(); |
15 | |||
16 | Console.WriteLine($"new id : {result}"); |
||
17 | 9e974b65 | GeunHo Song | |
18 | Assert.Pass(result.ID); |
||
19 | d85fc490 | GeunHo Song | } |
20 | } |
||
21 | |||
22 | [Test, Description("CreateOrUPdateAsync")] |
||
23 | public void CreateOrUPdateAsync() |
||
24 | { |
||
25 | using (Markus.Service.DataBase.Repositories.DOCUMENTITEMRepository repository = new Repositories.DOCUMENTITEMRepository(ConnectionStr, dbtype)) |
||
26 | { |
||
27 | 9e974b65 | GeunHo Song | |
28 | d85fc490 | GeunHo Song | var documentItem = new Entities.DOCUMENTITEM() |
29 | 9e974b65 | GeunHo Song | { |
30 | ID = "CC561E3CD580447E9A9508C563D257DA", |
||
31 | REVISION = "A", |
||
32 | DOCUMENT_NO = "PROC_TEST_DOCUMENT_NO", |
||
33 | d85fc490 | GeunHo Song | DOCUMENT_NAME = "PROC_TEST_DOCUMENT_NAME", |
34 | GROUP_NO = "PROC_GROUP_NO", |
||
35 | ORIGINAL_FILE = "PROC_TEST_ORIGINAL_FILE", |
||
36 | DOCUMENT_ID = "0000000001", |
||
37 | 9e974b65 | GeunHo Song | RESULT_FILE = "PROC_RESULT_FILE", |
38 | d85fc490 | GeunHo Song | RESULT = "PROC_RESULT", |
39 | PROJECT_NO = "PROC_RESULT", |
||
40 | Link = "PROC_TEST_Link" |
||
41 | }; |
||
42 | 264f0f92 | GeunHo Song | |
43 | |||
44 | d85fc490 | GeunHo Song | var result = repository.CreateOrUPdateAsync(documentItem).GetAwaiter().GetResult(); |
45 | 264f0f92 | GeunHo Song | |
46 | Console.WriteLine($"new id : {result}"); |
||
47 | 9e974b65 | GeunHo Song | Assert.Pass(result); |
48 | 264f0f92 | GeunHo Song | } |
49 | } |
||
50 | } |
||
51 | } |