Projekt

Obecné

Profil

Stáhnout (1020 Bajtů) Statistiky
| Větev: | Tag: | Revize:
1 782b6d38 Vojtěch Bartička
using Microsoft.VisualStudio.TestTools.UnitTesting;
2
using Models.Enums;
3
using Core.Entities;
4
using Serilog;
5
6
using System;
7 773d1205 schenkj
using System.Collections.Generic;
8
using System.Linq;
9
using System.Text;
10
using System.Threading.Tasks;
11 782b6d38 Vojtěch Bartička
using Microsoft.EntityFrameworkCore;
12
using AutoMapper;
13
using Core.MapperProfiles;
14 773d1205 schenkj
15 782b6d38 Vojtěch Bartička
namespace Core.Services
16 773d1205 schenkj
{
17 782b6d38 Vojtěch Bartička
    public class Utils
18
    {
19
    }
20
21
    public static class TestingMapper
22
    {
23
        public static IMapper GetMapper()
24
        {
25
            var mapperConfig = new MapperConfiguration(cfg =>
26
            {
27
                cfg.AddProfile<DocumentProfileEF>();
28
                cfg.AddProfile<UserProfileEF>();
29
                cfg.AddProfile<TagProfileEF>();
30
            });
31
32
            IMapper mapper = mapperConfig.CreateMapper();
33
            return mapper;
34
        }
35
    }
36
    public static class TestingLogger
37 773d1205 schenkj
    {
38 782b6d38 Vojtěch Bartička
        public static ILogger GetLogger() 
39
        {
40
            return new LoggerConfiguration().WriteTo.Console().CreateLogger(); /* logger */
41
        }
42 773d1205 schenkj
    }
43
}