Files
Wino-Mail/Wino.Core.Tests/CalendarReminderSnoozeOptionsTests.cs
Burak Kaan Köse 5b3739c6cf Add snooze support for calendar reminders (toast UI, service, DB) (#825)
* Filter reminder snooze options by default reminder

* Some updates.

* Fixing empty welcome page issue and attendee loading.

* Icon system for notifications and snooze options etc.
2026-03-04 00:12:52 +01:00

49 lines
1.4 KiB
C#

using FluentAssertions;
using Wino.Core.Domain;
using Xunit;
namespace Wino.Core.Tests;
public class CalendarReminderSnoozeOptionsTests
{
[Fact]
public void GetAllowedSnoozeMinutes_WhenDefaultIs15AndReminderIs15_Excludes30()
{
var options = CalendarReminderSnoozeOptions.GetAllowedSnoozeMinutes(
reminderDurationInSeconds: 15 * 60,
defaultReminderDurationInSeconds: 15 * 60);
options.Should().Equal(5, 10, 15);
}
[Fact]
public void GetAllowedSnoozeMinutes_WhenReminderIs5AndDefaultIs15_DoesNotPassEventStart()
{
var options = CalendarReminderSnoozeOptions.GetAllowedSnoozeMinutes(
reminderDurationInSeconds: 5 * 60,
defaultReminderDurationInSeconds: 15 * 60);
options.Should().Equal(5);
}
[Fact]
public void GetAllowedSnoozeMinutes_WhenDefaultReminderIsNone_UsesReminderDurationOnly()
{
var options = CalendarReminderSnoozeOptions.GetAllowedSnoozeMinutes(
reminderDurationInSeconds: 30 * 60,
defaultReminderDurationInSeconds: 0);
options.Should().Equal(5, 10, 15, 30);
}
[Fact]
public void GetAllowedSnoozeMinutes_WhenReminderIsUnderFiveMinutes_ReturnsNoOptions()
{
var options = CalendarReminderSnoozeOptions.GetAllowedSnoozeMinutes(
reminderDurationInSeconds: 60,
defaultReminderDurationInSeconds: 15 * 60);
options.Should().BeEmpty();
}
}