53 lines
1.5 KiB
C#
53 lines
1.5 KiB
C#
using Church.Net.DAL.EF;
|
|
using Church.Net.DAL.EFCoreDBF;
|
|
using Church.Net.Entity;
|
|
using Microsoft.EntityFrameworkCore;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using System;
|
|
using WebAPI.Logics;
|
|
using WebAPI.Logics.Core;
|
|
using WebAPI.Logics.Interface;
|
|
using WebAPI.Services;
|
|
using WebAPI.Services.AutoReplyCommands;
|
|
using WebAPI.Services.Interfaces;
|
|
|
|
namespace TestProject
|
|
{
|
|
public class FamilyMemberTest:TestBase
|
|
{
|
|
private ICrudLogic<NewVisitor>? logic;
|
|
private LineAutoBotService? botLogic;
|
|
private ICrudDAL<CellGroupRoutineEvent>? groupEventDALC;
|
|
|
|
[SetUp]
|
|
public void Setup()
|
|
{
|
|
base.Setup();
|
|
|
|
logic = serviceProvider.GetService<ICrudLogic<NewVisitor>>();
|
|
botLogic = serviceProvider.GetService<LineAutoBotService>();
|
|
groupEventDALC = serviceProvider.GetService<ICrudDAL<CellGroupRoutineEvent>>();
|
|
|
|
|
|
}
|
|
|
|
[Test]
|
|
public void GetAll()
|
|
{
|
|
//attendeeDALC.CheckExist(new CellGroupRoutineEventAttendee());
|
|
//var list = logic.GetAll();
|
|
//botLogic.AutoReply(null);
|
|
Assert.Pass();
|
|
}
|
|
[Test]
|
|
public void UtcUpdate()
|
|
{
|
|
var group = groupEventDALC.GetAll().FirstOrDefault();
|
|
group.Time = new DateTime(2022,8,26,19,30,0);
|
|
Assert.AreNotEqual(DateTimeKind.Utc, group.Time.Kind);
|
|
groupEventDALC.Update(group);
|
|
Assert.AreEqual(DateTimeKind.Utc, group.Time.Kind);
|
|
}
|
|
|
|
}
|
|
} |