mirror of
https://github.com/Kareadita/Kavita.git
synced 2025-06-04 06:04:37 -04:00
28 lines
721 B
C#
28 lines
721 B
C#
using System;
|
|
using API.Helpers.Converters;
|
|
using AutoMapper;
|
|
using Hangfire;
|
|
using Xunit;
|
|
using Xunit.Abstractions;
|
|
|
|
namespace API.Tests.Converters
|
|
{
|
|
public class CronConverterTests
|
|
{
|
|
private readonly ITestOutputHelper _testOutputHelper;
|
|
|
|
public CronConverterTests(ITestOutputHelper testOutputHelper)
|
|
{
|
|
_testOutputHelper = testOutputHelper;
|
|
}
|
|
|
|
[Theory]
|
|
[InlineData("daily", "0 0 * * *")]
|
|
[InlineData("disabled", "0 0 31 2 *")]
|
|
[InlineData("weekly", "0 0 * * 1")]
|
|
public void ConvertTest(string input, string expected)
|
|
{
|
|
Assert.Equal(expected, CronConverter.ConvertToCronNotation(input));
|
|
}
|
|
}
|
|
} |