sunpengfei
2025-08-22 d19b0883b817ca98cfcb872f2d6047c20fffc8d4
FlexJobApi.FlexJobServer.Test/Tasks/TaskUnitTest.cs
@@ -1,36 +1,39 @@
using FlexJobApi.Core;
using Microsoft.Extensions.DependencyInjection;
using System.Threading.Tasks;
namespace FlexJobApi.FlexJobServer.Test
{
    public class TaskUnitTest
    {
        private readonly ResourceHttpUtils http;
        private readonly ResourceHttpUtils resourceHttpUtils;
        public TaskUnitTest(ResourceHttpUtils http)
        public TaskUnitTest(ResourceHttpUtils resourceHttpUtils)
        {
            this.http = http;
            this.resourceHttpUtils = resourceHttpUtils;
        }
        [Fact]
        public async Task Test1()
        {
            var categories = await http.SendHttpAsync<
            Console.WriteLine();
            var categories = await resourceHttpUtils.SendHttpAsync<
                GetDictionaryCategorySelectQuery,
                FriendlyResult<SelectOption<Guid, GetDictionaryCategorySelectQueryOption>>>(
                new GetDictionaryCategorySelectQuery());
            Console.WriteLine();
            var result = await ResourceUtils.SendHttpAsync<SaveTaskInfoCommand, Guid>(new SaveTaskInfoCommand
            {
                Name = "测试任务",
                BillingMethod = EnumBillingMethod.Month,
                ServiceFee = 100,
                SettlementCycle = EnumSettlementCycle.Month,
                Benefits = new List<string>
                {
            //Console.WriteLine();
            //var result = await resourceHttpUtils.SendHttpAsync<SaveTaskInfoCommand, Guid>(new SaveTaskInfoCommand
            //{
            //    Name = "测试任务",
            //    BillingMethod = EnumBillingMethod.Month,
            //    ServiceFee = 100,
            //    SettlementCycle = EnumSettlementCycle.Month,
            //    Benefits = new List<string>
            //    {
                }
            });
            //    }
            //});
        }
    }
}