using Microsoft.Extensions.Configuration;
using Siger.CommonUtil;
using Siger.Schedule.KpiModule;
using System;
using System.IO;
using Xunit;

namespace Siger.UnitTest
{
    public class KpiUnitTest
    {
        static KpiUnitTest()
        {
            IConfiguration config = new ConfigurationBuilder()
                .AddJsonFile(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, @"appsettings.json"))
                .Build();
            ConfigFactory.InitConfigByContent(config);
        }
            

        [Fact]
        public void KpiAutorelationPushTest()
        {
            KpiAutoRelationSchedule push = new KpiAutoRelationSchedule();
            push.PreInit(null);
            push.Execute(null);
            push.AfterExecute(null);
        }

        [Fact]
        public void KpiPushTest()
        {
            KpiPushJobSchedule push = new KpiPushJobSchedule();
            push.PreInit(null);
            push.Execute(null);
            push.AfterExecute(null);
        }

        [Fact]
        public void KpiTasksJobPushTest()
        {
            KpiTasksJobSchedule push = new KpiTasksJobSchedule();
            push.PreInit(null);
            push.Execute(null);
            push.AfterExecute(null);
        }
    }
}
