1
|
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
2
|
using Models.Enums;
|
3
|
using Core.Entities;
|
4
|
using Serilog;
|
5
|
|
6
|
using System;
|
7
|
using System.Collections.Generic;
|
8
|
using System.Linq;
|
9
|
using System.Text;
|
10
|
using System.Threading.Tasks;
|
11
|
using Microsoft.EntityFrameworkCore;
|
12
|
using AutoMapper;
|
13
|
using Core.MapperProfiles;
|
14
|
using Core.Contexts;
|
15
|
using Microsoft.Extensions.Configuration;
|
16
|
|
17
|
namespace Core.Services
|
18
|
{
|
19
|
public class UserContext : DatabaseContext
|
20
|
{
|
21
|
public UserContext(IConfiguration configuration) : base(configuration) { }
|
22
|
|
23
|
//public static ILoggerFactory logger = LoggerFactory.Create(builder => { builder.AddConsole(); });
|
24
|
public ILogger logger = new LoggerConfiguration().WriteTo.Console().CreateLogger(); /* logger */
|
25
|
|
26
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
27
|
{
|
28
|
base.OnConfiguring(optionsBuilder);
|
29
|
optionsBuilder.UseSqlite("Data source=db.sqlite", b => b.MigrationsAssembly("RestAPI"));
|
30
|
//optionsBuilder.(logger);
|
31
|
}
|
32
|
|
33
|
}
|
34
|
[TestClass]
|
35
|
public class UserManagementTesting //testing of Core/Services/UserService
|
36
|
{
|
37
|
|
38
|
}
|
39
|
}
|