Revize 065f6462
Přidáno uživatelem Jakub Schenk před téměř 3 roky(ů)
Backend/BackendTesting/DocumentManagementTesting.cs | ||
---|---|---|
14 | 14 |
using Core.Contexts; |
15 | 15 |
using Microsoft.Extensions.Configuration; |
16 | 16 |
using Models.Documents; |
17 |
using Core.Services; |
|
17 | 18 |
|
18 |
namespace Core.Services
|
|
19 |
namespace BackendTesting
|
|
19 | 20 |
{ |
20 | 21 |
//class responsible for testing user and backend autentication on login |
21 | 22 |
[TestClass] |
... | ... | |
31 | 32 |
{ |
32 | 33 |
//creating new database |
33 | 34 |
this.ctx = new DatabaseContext(configuration); |
34 |
this.DS = new DocumentService.DocumentServiceEF(this.ctx, TestingLogger.GetLogger(), TestingMapper.GetMapper()); |
|
35 |
this.DS = new Core.Services.DocumentService.DocumentServiceEF(this.ctx, TestingLogger.GetLogger(), TestingMapper.GetMapper());
|
|
35 | 36 |
AppContext.SetSwitch("Npgsql.EnableLegacyTimestampBehavior", true); |
36 | 37 |
|
37 | 38 |
//ensure the database is fresh without unwanted users from previous testings |
... | ... | |
42 | 43 |
ctx.Users.Add(user); |
43 | 44 |
ctx.SaveChanges(); |
44 | 45 |
|
45 |
docList = makeRequest();
|
|
46 |
docList = MakeRequest();
|
|
46 | 47 |
} |
47 | 48 |
|
48 | 49 |
//method for testing Documents addition |
... | ... | |
94 | 95 |
|
95 | 96 |
|
96 | 97 |
//Method for preparing data for database creating DatabaseAssRequest from DocumentAddInfo witch contains documents strings |
97 |
private DocumentAddRequest makeRequest()
|
|
98 |
private DocumentAddRequest MakeRequest()
|
|
98 | 99 |
{ |
99 | 100 |
docList = new DocumentAddRequest() { Documents = new() }; |
100 | 101 |
var dc = new DocumentContent(); |
Backend/BackendTesting/UserManagementTesting.cs | ||
---|---|---|
15 | 15 |
using Microsoft.Extensions.Configuration; |
16 | 16 |
using Models.Users; |
17 | 17 |
|
18 |
namespace Core.Services |
|
18 |
using Core.Services; |
|
19 |
|
|
20 |
namespace BackendTesting |
|
19 | 21 |
{ |
20 | 22 |
//class responsible for testing user and backend autentication on login |
21 | 23 |
[TestClass] |
Backend/BackendTesting/Utils.cs | ||
---|---|---|
17 | 17 |
using Core.Authentication; |
18 | 18 |
using Microsoft.EntityFrameworkCore.Design; |
19 | 19 |
|
20 |
namespace Core.Services |
|
20 |
using Core.Services; |
|
21 |
|
|
22 |
namespace BackendTesting |
|
21 | 23 |
{ |
22 | 24 |
public class Utils |
23 | 25 |
{ |
Také k dispozici: Unified diff
Namespace correction
Merge request respond corrections - namespaces and name of MakeRequest() method