markus / ConvertService / ServiceBase / Markus.Service.DataBase.Test / DataBaseDocumentitem.cs @ d85fc490
이력 | 보기 | 이력해설 | 다운로드 (1.73 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 DataBaseDocumentitem : TestBaseMSSQL |
||
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 | 264f0f92 | GeunHo Song | |
16 | d85fc490 | GeunHo Song | Console.WriteLine($"new id : {result}"); |
17 | } |
||
18 | } |
||
19 | |||
20 | [Test, Description("CreateOrUPdateAsync")] |
||
21 | public void CreateOrUPdateAsync() |
||
22 | { |
||
23 | using (Markus.Service.DataBase.Repositories.DOCUMENTITEMRepository repository = new Repositories.DOCUMENTITEMRepository(ConnectionStr, dbtype)) |
||
24 | { |
||
25 | |||
26 | var documentItem = new Entities.DOCUMENTITEM() |
||
27 | 264f0f92 | GeunHo Song | { |
28 | d85fc490 | GeunHo Song | ID = "CC561E3CD580447E9A9508C563D257DA", |
29 | REVISION = "A", |
||
30 | DOCUMENT_NO = "PROC_TEST_DOCUMENT_NO", |
||
31 | DOCUMENT_NAME = "PROC_TEST_DOCUMENT_NAME", |
||
32 | GROUP_NO = "PROC_GROUP_NO", |
||
33 | ORIGINAL_FILE = "PROC_TEST_ORIGINAL_FILE", |
||
34 | DOCUMENT_ID = "0000000001", |
||
35 | RESULT_FILE = "PROC_RESULT_FILE", |
||
36 | RESULT = "PROC_RESULT", |
||
37 | PROJECT_NO = "PROC_RESULT", |
||
38 | Link = "PROC_TEST_Link" |
||
39 | }; |
||
40 | |||
41 | 264f0f92 | GeunHo Song | |
42 | d85fc490 | GeunHo Song | var result = repository.CreateOrUPdateAsync(documentItem).GetAwaiter().GetResult(); |
43 | 264f0f92 | GeunHo Song | |
44 | Console.WriteLine($"new id : {result}"); |
||
45 | } |
||
46 | } |
||
47 | } |
||
48 | } |