Projekt

Obecné

Profil

« Předchozí | Další » 

Revize ea53e0e1

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

user testing

first of was user testing mandatory, before testing autentization - with this user should be properly tested

Zobrazit rozdíly:

Backend/BackendTesting/Utils.cs
11 11
using Microsoft.EntityFrameworkCore;
12 12
using AutoMapper;
13 13
using Core.MapperProfiles;
14
using Microsoft.Extensions.Configuration;
15
using Core.Contexts;
14 16

  
15 17
namespace Core.Services
16 18
{
......
40 42
            return new LoggerConfiguration().WriteTo.Console().CreateLogger(); /* logger */
41 43
        }
42 44
    }
45

  
46
    public static class TestingUserService
47
    {
48
        private static readonly IConfiguration configuration = new ConfigurationBuilder().Build();
49
       
50
        public static IUserService GetUserService()
51
        {
52
            return new UserServiceEF(new DatabaseContext(configuration), TestingLogger.GetLogger(), TestingMapper.GetMapper()); 
53
        }
54
    }
43 55
}

Také k dispozici: Unified diff