개정판 4487f701
issue #000 DocInfoRepository and unit test project 완료.
Change-Id: Ib0047cb9839453e6073263e74b9dffbd9dc6eda7
ConvertService/ServiceBase/Markus.Service.DataBase.Test/DataBaseDocInfoPG.cs | ||
---|---|---|
6 | 6 |
{ |
7 | 7 |
public class DataBaseDocInfoPG : TestBasePG |
8 | 8 |
{ |
9 |
//[Test, Description("")]
|
|
10 |
public void DocPageInsert()
|
|
9 |
[Test, Description("DocInfoInsert")]
|
|
10 |
public void DocInfoInsert()
|
|
11 | 11 |
{ |
12 |
using (Markus.Service.DataBase.Repositories.DOCPAGERepository repository = new Repositories.DOCPAGERepository(ConnectionStr, dbtype)) |
|
12 |
string newConvertDocID = string.Empty; |
|
13 |
|
|
14 |
using (Markus.Service.DataBase.Repositories.ConvertDocRepository repository = new Repositories.ConvertDocRepository(ConnectionStr, dbtype)) |
|
13 | 15 |
{ |
14 |
List<Entities.DOCPAGE> pages = new List<Entities.DOCPAGE>(); |
|
16 |
newConvertDocID = repository.CreateAsync(ProjectNo, docUri, "111111").GetAwaiter().GetResult(); |
|
17 |
Console.WriteLine($"new id : {newConvertDocID}"); |
|
18 |
} |
|
15 | 19 |
|
16 |
for (int i = 0; i < 150000; i++) |
|
20 |
if (!string.IsNullOrEmpty(newConvertDocID)) |
|
21 |
{ |
|
22 |
using (Markus.Service.DataBase.Repositories.DOCINFORepository repository = new Repositories.DOCINFORepository(ConnectionStr, dbtype)) |
|
17 | 23 |
{ |
18 |
pages.Add(new Entities.DOCPAGE { DOCINFO_ID = "a764548c-9f44-4c4d-4597-f7ac43d2b7c1", PAGE_NUMBER = i+1, PAGE_WIDTH = "1210", PAGE_HEIGHT = "1210", PAGE_ANGLE = 0 }); |
|
19 |
} |
|
20 |
|
|
21 |
var result = repository.CreateAsync(pages).GetAwaiter().GetResult(); |
|
24 |
var result = repository.CreateAsync(newConvertDocID, 10).GetAwaiter().GetResult(); |
|
22 | 25 |
|
23 |
Console.WriteLine($"new id : {result}"); |
|
26 |
Console.WriteLine($"new id : {result}"); |
|
27 |
} |
|
24 | 28 |
} |
25 | 29 |
} |
26 | 30 |
} |
내보내기 Unified diff