markus / ConvertService / ServiceBase / Markus.Service.DataBase.Test / DataBaseDocInfo.cs @ 9e974b65
이력 | 보기 | 이력해설 | 다운로드 (1.16 KB)
1 |
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 |
[Test, Description("DocInfoInsert")] |
10 |
public void DocInfoInsert() |
11 |
{ |
12 |
string newConvertDocID = string.Empty; |
13 |
|
14 |
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 |
Assert.Pass(newConvertDocID); |
18 |
} |
19 |
|
20 |
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 |
|
25 |
Console.WriteLine($"new id : {result}"); |
26 |
Assert.Pass(result); |
27 |
} |
28 |
} |
29 |
} |
30 |
} |
31 |
} |