markus / ConvertService / ServiceBase / Markus.Service.DataBase.Test / DataBaseDocInfo.cs @ 30d84e1a
이력 | 보기 | 이력해설 | 다운로드 (1.13 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 DataBaseDocInfo : TestBaseMSSQL |
||
8 | { |
||
9 | 4487f701 | GeunHo Song | [Test, Description("DocInfoInsert")] |
10 | public void DocInfoInsert() |
||
11 | 264f0f92 | GeunHo Song | { |
12 | 4487f701 | GeunHo Song | string newConvertDocID = string.Empty; |
13 | 264f0f92 | GeunHo Song | |
14 | 4487f701 | GeunHo Song | using (Markus.Service.DataBase.Repositories.ConvertDocRepository repository = new Repositories.ConvertDocRepository(ConnectionStr, dbtype)) { |
15 | newConvertDocID = repository.CreateAsync(ProjectNo, docUri, "111111").GetAwaiter().GetResult(); |
||
16 | Console.WriteLine($"new id : {newConvertDocID}"); |
||
17 | c1946e9c | GeunHo Song | |
18 | 4487f701 | GeunHo Song | } |
19 | 264f0f92 | GeunHo Song | |
20 | 4487f701 | GeunHo Song | if (!string.IsNullOrEmpty(newConvertDocID)) { |
21 | using (Markus.Service.DataBase.Repositories.DOCINFORepository repository = new Repositories.DOCINFORepository(ConnectionStr, dbtype)) |
||
22 | { |
||
23 | var result = repository.CreateAsync(newConvertDocID, 10).GetAwaiter().GetResult(); |
||
24 | 264f0f92 | GeunHo Song | |
25 | 4487f701 | GeunHo Song | Console.WriteLine($"new id : {result}"); |
26 | 9e974b65 | GeunHo Song | Assert.Pass(result); |
27 | 4487f701 | GeunHo Song | } |
28 | 264f0f92 | GeunHo Song | } |
29 | } |
||
30 | } |
||
31 | } |