public void Set_SecondGap_ReturnTrue(int gapTime, int startTime) { string result = CronExpressionHelper.SetSecondGap(gapTime, startTime); var instant = GetInstant; instant[0] = $"{startTime}/{gapTime}"; Assert.Equal(string.Join(" ", instant), result); }
public void Set_Example1_ReturnTrue() { var result = CronExpressionHelper.SetSecondGap(2); Assert.Equal("0/2 * * * * ? *", result); }
public void Set_WrongSecondGap_ReturnFalse(int gapTime, int startTime) { Action action = () => CronExpressionHelper.SetSecondGap(gapTime, startTime); Exception exception = Assert.Throws <Exception>(action); }