Public Access
51 lines
1.6 KiB
C#
51 lines
1.6 KiB
C#
using MeetingAssistant.MeetingNotes;
|
|
|
|
namespace MeetingAssistant.Tests;
|
|
|
|
#if WINDOWS
|
|
public sealed class OutlookClassicMeetingMetadataProviderTests
|
|
{
|
|
[Fact]
|
|
public void ExtractAgendaStopsBeforeTeamsJoinInformation()
|
|
{
|
|
var agenda = OutlookClassicAppointmentMetadata.ExtractAgenda(
|
|
"""
|
|
Review current prototype
|
|
Decide next backend
|
|
|
|
________________________________________________________________________________
|
|
Microsoft Teams Need help?
|
|
Join the meeting now
|
|
https://teams.microsoft.com/l/meetup-join/...
|
|
""");
|
|
|
|
Assert.Equal("Review current prototype\nDecide next backend", agenda.Replace("\r\n", "\n", StringComparison.Ordinal));
|
|
}
|
|
|
|
[Fact]
|
|
public void NormalizeAttendeesDeduplicatesOrganizerAndRecipientEmail()
|
|
{
|
|
var attendees = OutlookClassicAppointmentMetadata.NormalizeAttendees([
|
|
"Marcus.Altmann@sew-eurodrive.de",
|
|
"Marcus.Altmann@sew-eurodrive.de <Marcus.Altmann@sew-eurodrive.de>",
|
|
"Schweigert, Manuel",
|
|
" "
|
|
]);
|
|
|
|
Assert.Equal([
|
|
"Marcus.Altmann@sew-eurodrive.de",
|
|
"Schweigert, Manuel"
|
|
], attendees);
|
|
}
|
|
|
|
[Theory]
|
|
[InlineData("Canceled: Project sync")]
|
|
[InlineData("Cancelled: Project sync")]
|
|
[InlineData("Abgesagt: Project sync")]
|
|
public void SubjectIndicatesCancellationRecognizesOutlookCanceledPrefixes(string subject)
|
|
{
|
|
Assert.True(OutlookClassicCom.SubjectIndicatesCancellation(subject));
|
|
}
|
|
}
|
|
#endif
|