using Hotline.Application.OrderApp.OrderVisitApp;
using Hotline.Share.Dtos.Order;
using Hotline.Share.Tools;
using Shouldly;

namespace Hotline.Tests.Application;
public class OrderVisitApplicationTest
{
    private readonly IOrderVisitApplication _orderVisitApplication;

    public OrderVisitApplicationTest(IOrderVisitApplication orderVisitApplication)
    {
        _orderVisitApplication = orderVisitApplication;
    }

    /// <summary>
    /// 统计测试
    /// </summary>
    [Theory]
    [InlineData("2024/07/01", "2024/10/10", null)]
    [InlineData("2024/07/01", "2024/10/10", "test")]
    public async Task QueryOrderVisitQuantity_Test(string start, string end, string? name)
    {
        var inDto = new QueryOrderVisitQuantity
        {
            StartTime = DateTime.Parse(start),
            EndTime = DateTime.Parse(end),
            EmployeeName = name
        };
        var items = await _orderVisitApplication.QueryOrderVisitQuantityAsync(inDto);
        items.ShouldNotBeNull();

        //if (name.NotNullOrEmpty())
        //{
        //    items.Any().ShouldBeTrue();
        //}
    }
}
