Ability to update settings. Take effect on next reboot.
This commit is contained in:
parent
e60f795410
commit
1050fa4e54
21 changed files with 953 additions and 146 deletions
28
API.Tests/Converters/CronConverterTests.cs
Normal file
28
API.Tests/Converters/CronConverterTests.cs
Normal file
|
@ -0,0 +1,28 @@
|
|||
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));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue