Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 3899cd87

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

  • ID 3899cd8713b49185023f9e123825807ad3fc257a
  • Rodič e39a1e68

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