markus / ConvertService / ServiceBase / Markus.Service.DataBase.Test / DataBaseDocumentitemPG.cs @ d85fc490
이력 | 보기 | 이력해설 | 다운로드 (1.67 KB)
1 |
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 |
[Test, Description("GetDocumentFirstAsync")] |
10 |
public void GetDocumentFirstAsync() |
11 |
{ |
12 |
using (Markus.Service.DataBase.Repositories.DOCUMENTITEMRepository repository = new Repositories.DOCUMENTITEMRepository(ConnectionStr, dbtype)) |
13 |
{ |
14 |
var result = repository.GetFirstAsync("000000", "4000005").GetAwaiter().GetResult(); |
15 |
|
16 |
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 |
var documentItem = new Entities.DOCUMENTITEM() |
26 |
{ |
27 |
REVISION ="A", |
28 |
DOCUMENT_NO= "PROC_TEST_DOCUMENT_NO", |
29 |
DOCUMENT_NAME = "PROC_TEST_DOCUMENT_NAME", |
30 |
GROUP_NO = "PROC_GROUP_NO", |
31 |
ORIGINAL_FILE = "PROC_TEST_ORIGINAL_FILE", |
32 |
DOCUMENT_ID = "0000000001", |
33 |
RESULT_FILE= "PROC_RESULT_FILE", |
34 |
RESULT = "PROC_RESULT", |
35 |
PROJECT_NO = "PROC_RESULT", |
36 |
Link = "PROC_TEST_Link" |
37 |
}; |
38 |
|
39 |
|
40 |
var result = repository.CreateOrUPdateAsync(documentItem).GetAwaiter().GetResult(); |
41 |
|
42 |
Console.WriteLine($"new id : {result}"); |
43 |
} |
44 |
} |
45 |
} |
46 |
} |