blob: 0c42c67aa7144a826f16f1f724d1f4c9a78b50b4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
using Microsoft.Extensions.Logging.Abstractions;
namespace CrupestApi.Commons.Crud.Tests;
public class CrudServiceTest
{
private readonly SqliteMemoryConnectionFactory _memoryConnectionFactory = new SqliteMemoryConnectionFactory();
private readonly CrudService<TestEntity> _crudService;
public CrudServiceTest()
{
var columnTypeProvider = new ColumnTypeProvider();
var tableInfoFactory = new TableInfoFactory(columnTypeProvider, NullLoggerFactory.Instance);
var dbConnectionFactory = new SqliteMemoryConnectionFactory();
_crudService = new CrudService<TestEntity>(
tableInfoFactory, dbConnectionFactory, NullLoggerFactory.Instance);
}
[Fact]
public void CrudTest()
{
_crudService.Create(new TestEntity()
{
Name = "crupest",
Age = 18,
});
}
}
|