Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 0f58bb56

Přidáno uživatelem Jakub Schenk před asi 2 roky(ů)

Testing of documents in backend

Add and get documents from database

Zobrazit rozdíly:

Backend/BackendTesting/Utils.cs
15 15
using Core.Contexts;
16 16
using Microsoft.Extensions.Options;
17 17
using Core.Authentication;
18
using Microsoft.EntityFrameworkCore.Design;
18 19

  
19 20
namespace Core.Services
20 21
{
......
39 40
    }
40 41
    public static class TestingLogger
41 42
    {
42
        public static ILogger GetLogger() 
43
        public static ILogger GetLogger()
43 44
        {
44 45
            return new LoggerConfiguration().WriteTo.Console().CreateLogger(); /* logger */
45 46
        }
......
48 49
    public static class TestingUserService
49 50
    {
50 51
        private static readonly IConfiguration configuration = new ConfigurationBuilder().Build();
51
       
52

  
52 53
        public static IUserService GetUserService()
53 54
        {
54
            return new UserServiceEF(new DatabaseContext(configuration), TestingLogger.GetLogger(), TestingMapper.GetMapper()); 
55
            return new UserServiceEF(new DatabaseContext(configuration), TestingLogger.GetLogger(), TestingMapper.GetMapper());
55 56
        }
56 57
    }
57 58

  

Také k dispozici: Unified diff