Skip to content

Commit

Permalink
Update validation
Browse files Browse the repository at this point in the history
  • Loading branch information
austins committed Oct 6, 2024
1 parent 765410f commit 5dc4c14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public sealed class SendTempReply : ICommand
/// <summary>
/// The delay after which the reply will be deleted.
/// </summary>
[Range(typeof(TimeSpan), "00:00:01", "00:01:00")]
[Range(typeof(TimeSpan), "00:00:01", "00:01:30")]
public TimeSpan DeletionDelay { get; init; } = TimeSpan.FromSeconds(15);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ public sealed class SendTempReplyTests
[InlineData("00:00:10")]
[InlineData("00:00:30.678")]
[InlineData("00:01:00")]
[InlineData("00:01:30")]
public void Valid_ValidatesWithoutErrors(string deletionDelay)
{
// Arrange
Expand Down Expand Up @@ -79,7 +80,7 @@ public void Invalid_Text_HasValidationError(string? text)
[Theory]
[InlineData("00:00:00")] // 0 seconds
[InlineData("00:00:00.5")] // 0.5 seconds
[InlineData("00:01:00.1")] // 1 minute 0.1 seconds
[InlineData("00:01:30.1")] // 1 minute 30.1 seconds
public void Invalid_DeletionDelay_HasValidationError(string deletionDelay)
{
// Arrange
Expand Down

0 comments on commit 5dc4c14

Please sign in to comment.