From 167831a4a7e55bc91d6110fbc46970d3352c62e7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 1 Dec 2025 14:57:21 +0000 Subject: [PATCH 1/7] Initial plan From c2e049670c86aea3e1fa5c8d664c8fe1b9960ec1 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 1 Dec 2025 15:06:45 +0000 Subject: [PATCH 2/7] Add Convert-MeetingMembersToMarkdown cmdlet with helper functions and tests Co-authored-by: rulasg <6884408+rulasg@users.noreply.github.com> --- .../convertMeetingMembersToMarkdown.test.ps1 | 163 ++++++++++++++++++ private/parseMemberEmail.ps1 | 76 ++++++++ public/convertMeetingMembersToMarkdown.ps1 | 59 +++++++ 3 files changed, 298 insertions(+) create mode 100644 Test/public/convertMeetingMembersToMarkdown.test.ps1 create mode 100644 private/parseMemberEmail.ps1 create mode 100644 public/convertMeetingMembersToMarkdown.ps1 diff --git a/Test/public/convertMeetingMembersToMarkdown.test.ps1 b/Test/public/convertMeetingMembersToMarkdown.test.ps1 new file mode 100644 index 0000000..a98364a --- /dev/null +++ b/Test/public/convertMeetingMembersToMarkdown.test.ps1 @@ -0,0 +1,163 @@ +$TESTED_MODULE_PATH = $PSScriptRoot | split-path -Parent | split-path -Parent + +function Test_ConvertMeetingMembersToMarkdown_SingleCompany { + + # Arrange + $testedModulePath = $TESTED_MODULE_PATH | Join-Path -ChildPath "NotesHelper.psd1" + $testedModule = Import-Module -Name $testedModulePath -Force -PassThru + + $input = "Gisela Torres <0gis0@github.com>, `"David (GitHub) Losert`" " + + # Act + $result = & $testedModule { + param($input) + Convert-MeetingMembersToMarkdown -MeetingMembers $input + } -args $input + + # Assert + $expected = @" +- Github + - Gisela Torres <0gis0@github.com> + - "David (GitHub) Losert" +"@ + Assert-AreEqual -Expected $expected -Presented $result -Comment "Single company output should match expected format" +} + +function Test_ConvertMeetingMembersToMarkdown_MultipleCompanies { + + # Arrange + $testedModulePath = $TESTED_MODULE_PATH | Join-Path -ChildPath "NotesHelper.psd1" + $testedModule = Import-Module -Name $testedModulePath -Force -PassThru + + $input = "Gisela Torres <0gis0@github.com>, `"David (GitHub) Losert`" , Gisela Torres , `"Martin Fernandez, Borja`" , `"Jovanovic Obradovic, Mat`" , `"Molina Merchan, Jesus`" " + + # Act + $result = & $testedModule { + param($input) + Convert-MeetingMembersToMarkdown -MeetingMembers $input + } -args $input + + # Assert + $expected = @" +- Github + - Gisela Torres <0gis0@github.com> + - "David (GitHub) Losert" +- Mapfre + - "Martin Fernandez, Borja" + - "Jovanovic Obradovic, Mat" + - "Molina Merchan, Jesus" +- Microsoft + - Gisela Torres +"@ + Assert-AreEqual -Expected $expected -Presented $result -Comment "Multiple companies should be sorted alphabetically" +} + +function Test_ConvertMeetingMembersToMarkdown_DuplicateMemberDifferentCompanies { + + # Arrange + $testedModulePath = $TESTED_MODULE_PATH | Join-Path -ChildPath "NotesHelper.psd1" + $testedModule = Import-Module -Name $testedModulePath -Force -PassThru + + $input = "Gisela Torres <0gis0@github.com>, Gisela Torres " + + # Act + $result = & $testedModule { + param($input) + Convert-MeetingMembersToMarkdown -MeetingMembers $input + } -args $input + + # Assert + # Same person with different emails should appear in both company groups + $expected = @" +- Github + - Gisela Torres <0gis0@github.com> +- Microsoft + - Gisela Torres +"@ + Assert-AreEqual -Expected $expected -Presented $result -Comment "Same person with different emails should appear in both companies" +} + +function Test_ConvertMeetingMembersToMarkdown_SpecialCharactersInName { + + # Arrange + $testedModulePath = $TESTED_MODULE_PATH | Join-Path -ChildPath "NotesHelper.psd1" + $testedModule = Import-Module -Name $testedModulePath -Force -PassThru + + $input = "`"David (GitHub) Losert`" , `"Martin Fernandez, Borja`" " + + # Act + $result = & $testedModule { + param($input) + Convert-MeetingMembersToMarkdown -MeetingMembers $input + } -args $input + + # Assert + # Names with special characters (parentheses, commas) should be preserved + $expected = @" +- Github + - "David (GitHub) Losert" +- Mapfre + - "Martin Fernandez, Borja" +"@ + Assert-AreEqual -Expected $expected -Presented $result -Comment "Names with special characters should be preserved" +} + +function Test_ConvertMeetingMembersToMarkdown_EmptyInput { + + # Arrange + $testedModulePath = $TESTED_MODULE_PATH | Join-Path -ChildPath "NotesHelper.psd1" + $testedModule = Import-Module -Name $testedModulePath -Force -PassThru + + $input = "" + + # Act + $result = & $testedModule { + param($input) + Convert-MeetingMembersToMarkdown -MeetingMembers $input + } -args $input + + # Assert + Assert-AreEqual -Expected "" -Presented $result -Comment "Empty input should return empty string" +} + +function Test_ConvertMeetingMembersToMarkdown_WhitespaceOnlyInput { + + # Arrange + $testedModulePath = $TESTED_MODULE_PATH | Join-Path -ChildPath "NotesHelper.psd1" + $testedModule = Import-Module -Name $testedModulePath -Force -PassThru + + $input = " " + + # Act + $result = & $testedModule { + param($input) + Convert-MeetingMembersToMarkdown -MeetingMembers $input + } -args $input + + # Assert + Assert-AreEqual -Expected "" -Presented $result -Comment "Whitespace-only input should return empty string" +} + +function Test_ConvertMeetingMembersToMarkdown_SingleMember { + + # Arrange + $testedModulePath = $TESTED_MODULE_PATH | Join-Path -ChildPath "NotesHelper.psd1" + $testedModule = Import-Module -Name $testedModulePath -Force -PassThru + + $input = "John Doe " + + # Act + $result = & $testedModule { + param($input) + Convert-MeetingMembersToMarkdown -MeetingMembers $input + } -args $input + + # Assert + $expected = @" +- Example + - John Doe +"@ + Assert-AreEqual -Expected $expected -Presented $result -Comment "Single member should work correctly" +} + +Export-ModuleMember -Function Test_* diff --git a/private/parseMemberEmail.ps1 b/private/parseMemberEmail.ps1 new file mode 100644 index 0000000..41f4faf --- /dev/null +++ b/private/parseMemberEmail.ps1 @@ -0,0 +1,76 @@ + +function parseMemberEmail { + [CmdletBinding()] + param( + [Parameter(Mandatory, ValueFromPipeline)][string]$MemberString + ) + + process { + $memberString = $MemberString.Trim() + + if ([string]::IsNullOrWhiteSpace($memberString)) { + return $null + } + + # Pattern: "Name" or Name + # The display name may contain quotes, commas, parentheses + $pattern = '^(.+?)\s*<([^>]+)>$' + + if ($memberString -match $pattern) { + $displayName = $matches[1].Trim() + $email = $matches[2].Trim() + + # Extract domain from email + $domain = ($email -split '@')[1] + if ($domain) { + # Get company name from domain (first part before any dots) + $company = ($domain -split '\.')[0] + # Capitalize first letter + $company = $company.Substring(0, 1).ToUpper() + $company.Substring(1).ToLower() + } + else { + $company = "Unknown" + } + + return [PSCustomObject]@{ + DisplayName = $displayName + Email = $email + Company = $company + OriginalFormat = $memberString + } + } + + return $null + } +} + +function groupMembersByCompany { + [CmdletBinding()] + param( + [Parameter(Mandatory)][object[]]$Members + ) + + # Filter out null members + $validMembers = $Members | Where-Object { $null -ne $_ } + + if ($validMembers.Count -eq 0) { + return "" + } + + # Group by company and sort by company name + $grouped = $validMembers | Group-Object -Property Company | Sort-Object -Property Name + + $result = @() + + foreach ($group in $grouped) { + # Add company header + $result += "- $($group.Name)" + + # Add members with 4-space indentation + foreach ($member in $group.Group) { + $result += " - $($member.OriginalFormat)" + } + } + + return ($result -join "`n") +} diff --git a/public/convertMeetingMembersToMarkdown.ps1 b/public/convertMeetingMembersToMarkdown.ps1 new file mode 100644 index 0000000..836782f --- /dev/null +++ b/public/convertMeetingMembersToMarkdown.ps1 @@ -0,0 +1,59 @@ + +function Convert-MeetingMembersToMarkdown { + [CmdletBinding()] + param( + [Parameter(Position = 0, ValueFromPipeline)][string]$MeetingMembers, + [Parameter()][switch]$SortByCompany + ) + + process { + if ([string]::IsNullOrWhiteSpace($MeetingMembers)) { + return "" + } + + # Parse the comma-separated list, handling quoted names with commas + # Split on ', ' followed by a quote or a letter (not inside quotes) + $members = @() + $currentMember = "" + $inQuotes = $false + + for ($i = 0; $i -lt $MeetingMembers.Length; $i++) { + $char = $MeetingMembers[$i] + + if ($char -eq '"') { + $inQuotes = -not $inQuotes + $currentMember += $char + } + elseif ($char -eq ',' -and -not $inQuotes) { + # End of member + if (-not [string]::IsNullOrWhiteSpace($currentMember)) { + $members += $currentMember.Trim() + } + $currentMember = "" + } + else { + $currentMember += $char + } + } + + # Add the last member + if (-not [string]::IsNullOrWhiteSpace($currentMember)) { + $members += $currentMember.Trim() + } + + # Parse each member + $parsedMembers = $members | ForEach-Object { parseMemberEmail -MemberString $_ } + + # Filter out nulls + $parsedMembers = $parsedMembers | Where-Object { $null -ne $_ } + + if ($parsedMembers.Count -eq 0) { + return "" + } + + # Group and format as markdown + $result = groupMembersByCompany -Members $parsedMembers + + return $result + } +} Export-ModuleMember -Function 'Convert-MeetingMembersToMarkdown' From b56fc15e716816177b787a694db7bab18ce54e31 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 1 Dec 2025 15:09:51 +0000 Subject: [PATCH 3/7] Address code review feedback: fix empty domain edge case and remove unused parameter Co-authored-by: rulasg <6884408+rulasg@users.noreply.github.com> --- private/parseMemberEmail.ps1 | 9 +++++++-- public/convertMeetingMembersToMarkdown.ps1 | 3 +-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/private/parseMemberEmail.ps1 b/private/parseMemberEmail.ps1 index 41f4faf..c0a3509 100644 --- a/private/parseMemberEmail.ps1 +++ b/private/parseMemberEmail.ps1 @@ -25,8 +25,13 @@ function parseMemberEmail { if ($domain) { # Get company name from domain (first part before any dots) $company = ($domain -split '\.')[0] - # Capitalize first letter - $company = $company.Substring(0, 1).ToUpper() + $company.Substring(1).ToLower() + # Capitalize first letter if company has content + if ($company.Length -gt 0) { + $company = $company.Substring(0, 1).ToUpper() + $company.Substring(1).ToLower() + } + else { + $company = "Unknown" + } } else { $company = "Unknown" diff --git a/public/convertMeetingMembersToMarkdown.ps1 b/public/convertMeetingMembersToMarkdown.ps1 index 836782f..5a22777 100644 --- a/public/convertMeetingMembersToMarkdown.ps1 +++ b/public/convertMeetingMembersToMarkdown.ps1 @@ -2,8 +2,7 @@ function Convert-MeetingMembersToMarkdown { [CmdletBinding()] param( - [Parameter(Position = 0, ValueFromPipeline)][string]$MeetingMembers, - [Parameter()][switch]$SortByCompany + [Parameter(Position = 0, ValueFromPipeline)][string]$MeetingMembers ) process { From a5a621dbce90ab7ba50273a3685d1f537b9c6f92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20=28Dibildos=29=20Gonz=C3=A1lez?= Date: Mon, 1 Dec 2025 16:13:42 +0000 Subject: [PATCH 4/7] Add devcontainer configuration for PowerShell environment --- .devcontainer/devcontainer.json | 43 +++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .devcontainer/devcontainer.json diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..194474c --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,43 @@ + +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/powershell +{ + "name": "PowerShell", + // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile + "image": "mcr.microsoft.com/powershell:lts-ubuntu-22.04", + + "features": { + "ghcr.io/devcontainers/features/common-utils:2": {}, + "ghcr.io/devcontainers/features/sshd:1": {}, + "ghcr.io/devcontainers/features/dotnet:1": {}, + "ghcr.io/devcontainers/features/github-cli:1": {} + }, + + "postCreateCommand": "sudo chsh vscode -s \"$(which pwsh)\"", + + // Configure tool-specific properties. + "customizations": { + // Configure properties specific to VS Code. + "vscode": { + // Set *default* container specific settings.json values on container create. + "settings": { + "terminal.integrated.defaultProfile.linux": "pwsh" + }, + + // Add the IDs of extensions you want installed when the container is created. + "extensions": [ + "ms-vscode.powershell", + "github.copilot", + "GitHub.copilot-chat", + "mhutchie.git-graph" + ] + } + } + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "root" +} + From ef7fced29a25aee9500388a053d5cf6db48f73f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20=28Dibildos=29=20Gonz=C3=A1lez?= Date: Mon, 1 Dec 2025 16:14:37 +0000 Subject: [PATCH 5/7] Refactor tests to directly call Convert-MeetingMembersToMarkdown, removing unnecessary module imports --- .../convertMeetingMembersToMarkdown.test.ps1 | 65 +++---------------- 1 file changed, 10 insertions(+), 55 deletions(-) diff --git a/Test/public/convertMeetingMembersToMarkdown.test.ps1 b/Test/public/convertMeetingMembersToMarkdown.test.ps1 index a98364a..5a9d435 100644 --- a/Test/public/convertMeetingMembersToMarkdown.test.ps1 +++ b/Test/public/convertMeetingMembersToMarkdown.test.ps1 @@ -1,18 +1,10 @@ -$TESTED_MODULE_PATH = $PSScriptRoot | split-path -Parent | split-path -Parent - function Test_ConvertMeetingMembersToMarkdown_SingleCompany { # Arrange - $testedModulePath = $TESTED_MODULE_PATH | Join-Path -ChildPath "NotesHelper.psd1" - $testedModule = Import-Module -Name $testedModulePath -Force -PassThru - $input = "Gisela Torres <0gis0@github.com>, `"David (GitHub) Losert`" " # Act - $result = & $testedModule { - param($input) - Convert-MeetingMembersToMarkdown -MeetingMembers $input - } -args $input + $result = Convert-MeetingMembersToMarkdown -MeetingMembers $input # Assert $expected = @" @@ -26,16 +18,10 @@ function Test_ConvertMeetingMembersToMarkdown_SingleCompany { function Test_ConvertMeetingMembersToMarkdown_MultipleCompanies { # Arrange - $testedModulePath = $TESTED_MODULE_PATH | Join-Path -ChildPath "NotesHelper.psd1" - $testedModule = Import-Module -Name $testedModulePath -Force -PassThru - $input = "Gisela Torres <0gis0@github.com>, `"David (GitHub) Losert`" , Gisela Torres , `"Martin Fernandez, Borja`" , `"Jovanovic Obradovic, Mat`" , `"Molina Merchan, Jesus`" " # Act - $result = & $testedModule { - param($input) - Convert-MeetingMembersToMarkdown -MeetingMembers $input - } -args $input + $result = Convert-MeetingMembersToMarkdown -MeetingMembers $input # Assert $expected = @" @@ -54,17 +40,12 @@ function Test_ConvertMeetingMembersToMarkdown_MultipleCompanies { function Test_ConvertMeetingMembersToMarkdown_DuplicateMemberDifferentCompanies { - # Arrange - $testedModulePath = $TESTED_MODULE_PATH | Join-Path -ChildPath "NotesHelper.psd1" - $testedModule = Import-Module -Name $testedModulePath -Force -PassThru $input = "Gisela Torres <0gis0@github.com>, Gisela Torres " - # Act - $result = & $testedModule { - param($input) - Convert-MeetingMembersToMarkdown -MeetingMembers $input - } -args $input + + $result = Convert-MeetingMembersToMarkdown -MeetingMembers $input + # Assert # Same person with different emails should appear in both company groups @@ -80,16 +61,10 @@ function Test_ConvertMeetingMembersToMarkdown_DuplicateMemberDifferentCompanies function Test_ConvertMeetingMembersToMarkdown_SpecialCharactersInName { # Arrange - $testedModulePath = $TESTED_MODULE_PATH | Join-Path -ChildPath "NotesHelper.psd1" - $testedModule = Import-Module -Name $testedModulePath -Force -PassThru - $input = "`"David (GitHub) Losert`" , `"Martin Fernandez, Borja`" " # Act - $result = & $testedModule { - param($input) - Convert-MeetingMembersToMarkdown -MeetingMembers $input - } -args $input + $result = Convert-MeetingMembersToMarkdown -MeetingMembers $input # Assert # Names with special characters (parentheses, commas) should be preserved @@ -105,16 +80,10 @@ function Test_ConvertMeetingMembersToMarkdown_SpecialCharactersInName { function Test_ConvertMeetingMembersToMarkdown_EmptyInput { # Arrange - $testedModulePath = $TESTED_MODULE_PATH | Join-Path -ChildPath "NotesHelper.psd1" - $testedModule = Import-Module -Name $testedModulePath -Force -PassThru - $input = "" # Act - $result = & $testedModule { - param($input) - Convert-MeetingMembersToMarkdown -MeetingMembers $input - } -args $input + $result = Convert-MeetingMembersToMarkdown -MeetingMembers $input # Assert Assert-AreEqual -Expected "" -Presented $result -Comment "Empty input should return empty string" @@ -123,16 +92,10 @@ function Test_ConvertMeetingMembersToMarkdown_EmptyInput { function Test_ConvertMeetingMembersToMarkdown_WhitespaceOnlyInput { # Arrange - $testedModulePath = $TESTED_MODULE_PATH | Join-Path -ChildPath "NotesHelper.psd1" - $testedModule = Import-Module -Name $testedModulePath -Force -PassThru - $input = " " # Act - $result = & $testedModule { - param($input) - Convert-MeetingMembersToMarkdown -MeetingMembers $input - } -args $input + $result = Convert-MeetingMembersToMarkdown -MeetingMembers $input # Assert Assert-AreEqual -Expected "" -Presented $result -Comment "Whitespace-only input should return empty string" @@ -141,16 +104,10 @@ function Test_ConvertMeetingMembersToMarkdown_WhitespaceOnlyInput { function Test_ConvertMeetingMembersToMarkdown_SingleMember { # Arrange - $testedModulePath = $TESTED_MODULE_PATH | Join-Path -ChildPath "NotesHelper.psd1" - $testedModule = Import-Module -Name $testedModulePath -Force -PassThru - $input = "John Doe " # Act - $result = & $testedModule { - param($input) - Convert-MeetingMembersToMarkdown -MeetingMembers $input - } -args $input + $result = Convert-MeetingMembersToMarkdown -MeetingMembers $input # Assert $expected = @" @@ -158,6 +115,4 @@ function Test_ConvertMeetingMembersToMarkdown_SingleMember { - John Doe "@ Assert-AreEqual -Expected $expected -Presented $result -Comment "Single member should work correctly" -} - -Export-ModuleMember -Function Test_* +} \ No newline at end of file From 417fb0897de3b4ddd56f924565d866dcfce1522e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20=28Dibildos=29=20Gonz=C3=A1lez?= Date: Mon, 1 Dec 2025 16:23:38 +0000 Subject: [PATCH 6/7] Add test for Convert-MeetingMembersToMarkdown with large sample input --- .../convertMeetingMembersToMarkdown.test.ps1 | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/Test/public/convertMeetingMembersToMarkdown.test.ps1 b/Test/public/convertMeetingMembersToMarkdown.test.ps1 index 5a9d435..5cfca6f 100644 --- a/Test/public/convertMeetingMembersToMarkdown.test.ps1 +++ b/Test/public/convertMeetingMembersToMarkdown.test.ps1 @@ -115,4 +115,36 @@ function Test_ConvertMeetingMembersToMarkdown_SingleMember { - John Doe "@ Assert-AreEqual -Expected $expected -Presented $result -Comment "Single member should work correctly" +} + +function Test_ConvertMeetingsMembersToMarkdown_Big_sample{ + + $imput = @" +"Angulo, Amparo" , "Ana González Talaván (She/Her)" , David Mangas Nuñez , Felipe Tomazini , janet.amezcua@microsoft.com, Jose Luis De la Cruz Moreno , "Mora Alonso, Juan Antonio" , juan.olivera@microsoft.com, "Vilanova Arnal, Juan" , miguelselman1@bookings.microsoft.com, miguelselman@microsoft.com, "Oana (GitHub) Dinca" , Oscar Muller , Pilar Blasco , Ramiro Gómez de la Cruz , Ricardo Sastre Martín , Roberto Arocha , Ryan Drewery , Sergio Gallego Martinez , silviahe@microsoft.com, Stéphane Biermann , Tim Guibert +"@ + + $result = Convert-MeetingMembersToMarkdown -MeetingMembers $imput + + Assert-AreEqual -Presented $result -Expected @" +- Accenture + - "Angulo, Amparo" + - "Mora Alonso, Juan Antonio" + - "Vilanova Arnal, Juan" +- Github + - "Oana (GitHub) Dinca" + - Oscar Muller + - Ryan Drewery + - Stéphane Biermann + - Tim Guibert +- Microsoft + - "Ana González Talaván (She/Her)" + - David Mangas Nuñez + - Felipe Tomazini + - Jose Luis De la Cruz Moreno + - Pilar Blasco + - Ramiro Gómez de la Cruz + - Ricardo Sastre Martín + - Roberto Arocha + - Sergio Gallego Martinez +"@ } \ No newline at end of file From 7cd2c4f862eaea7854737b86fe4fa74b00d9aaea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20=28Dibildos=29=20Gonz=C3=A1lez?= Date: Mon, 1 Dec 2025 16:25:58 +0000 Subject: [PATCH 7/7] Update tests for Convert-MeetingMembersToMarkdown to reflect new input format and expected output --- .../convertMeetingMembersToMarkdown.test.ps1 | 95 +++++++++---------- 1 file changed, 47 insertions(+), 48 deletions(-) diff --git a/Test/public/convertMeetingMembersToMarkdown.test.ps1 b/Test/public/convertMeetingMembersToMarkdown.test.ps1 index 5cfca6f..22bf1c8 100644 --- a/Test/public/convertMeetingMembersToMarkdown.test.ps1 +++ b/Test/public/convertMeetingMembersToMarkdown.test.ps1 @@ -1,16 +1,16 @@ function Test_ConvertMeetingMembersToMarkdown_SingleCompany { # Arrange - $input = "Gisela Torres <0gis0@github.com>, `"David (GitHub) Losert`" " + $input = "Alice Johnson , `"Bob Smith (AlphaTech)`" " # Act $result = Convert-MeetingMembersToMarkdown -MeetingMembers $input # Assert $expected = @" -- Github - - Gisela Torres <0gis0@github.com> - - "David (GitHub) Losert" +- Alphatech + - Alice Johnson + - "Bob Smith (AlphaTech)" "@ Assert-AreEqual -Expected $expected -Presented $result -Comment "Single company output should match expected format" } @@ -18,42 +18,41 @@ function Test_ConvertMeetingMembersToMarkdown_SingleCompany { function Test_ConvertMeetingMembersToMarkdown_MultipleCompanies { # Arrange - $input = "Gisela Torres <0gis0@github.com>, `"David (GitHub) Losert`" , Gisela Torres , `"Martin Fernandez, Borja`" , `"Jovanovic Obradovic, Mat`" , `"Molina Merchan, Jesus`" " + $input = "Alice Johnson , `"Bob Smith (AlphaTech)`" , Alice Johnson , `"Charlie Brown, David`" , `"Emma Wilson, Frank`" , `"Grace Lee, Henry`" " # Act $result = Convert-MeetingMembersToMarkdown -MeetingMembers $input # Assert $expected = @" -- Github - - Gisela Torres <0gis0@github.com> - - "David (GitHub) Losert" -- Mapfre - - "Martin Fernandez, Borja" - - "Jovanovic Obradovic, Mat" - - "Molina Merchan, Jesus" -- Microsoft - - Gisela Torres +- Alphatech + - Alice Johnson + - "Bob Smith (AlphaTech)" +- Betasoft + - Alice Johnson +- Gammatech + - "Charlie Brown, David" + - "Emma Wilson, Frank" + - "Grace Lee, Henry" "@ Assert-AreEqual -Expected $expected -Presented $result -Comment "Multiple companies should be sorted alphabetically" } function Test_ConvertMeetingMembersToMarkdown_DuplicateMemberDifferentCompanies { + # Arrange + $input = "Alice Johnson , Alice Johnson " - $input = "Gisela Torres <0gis0@github.com>, Gisela Torres " - - + # Act $result = Convert-MeetingMembersToMarkdown -MeetingMembers $input - # Assert # Same person with different emails should appear in both company groups $expected = @" -- Github - - Gisela Torres <0gis0@github.com> -- Microsoft - - Gisela Torres +- Alphatech + - Alice Johnson +- Betasoft + - Alice Johnson "@ Assert-AreEqual -Expected $expected -Presented $result -Comment "Same person with different emails should appear in both companies" } @@ -61,7 +60,7 @@ function Test_ConvertMeetingMembersToMarkdown_DuplicateMemberDifferentCompanies function Test_ConvertMeetingMembersToMarkdown_SpecialCharactersInName { # Arrange - $input = "`"David (GitHub) Losert`" , `"Martin Fernandez, Borja`" " + $input = "`"Bob Smith (AlphaTech)`" , `"Charlie Brown, David`" " # Act $result = Convert-MeetingMembersToMarkdown -MeetingMembers $input @@ -69,10 +68,10 @@ function Test_ConvertMeetingMembersToMarkdown_SpecialCharactersInName { # Assert # Names with special characters (parentheses, commas) should be preserved $expected = @" -- Github - - "David (GitHub) Losert" -- Mapfre - - "Martin Fernandez, Borja" +- Alphatech + - "Bob Smith (AlphaTech)" +- Gammatech + - "Charlie Brown, David" "@ Assert-AreEqual -Expected $expected -Presented $result -Comment "Names with special characters should be preserved" } @@ -120,31 +119,31 @@ function Test_ConvertMeetingMembersToMarkdown_SingleMember { function Test_ConvertMeetingsMembersToMarkdown_Big_sample{ $imput = @" -"Angulo, Amparo" , "Ana González Talaván (She/Her)" , David Mangas Nuñez , Felipe Tomazini , janet.amezcua@microsoft.com, Jose Luis De la Cruz Moreno , "Mora Alonso, Juan Antonio" , juan.olivera@microsoft.com, "Vilanova Arnal, Juan" , miguelselman1@bookings.microsoft.com, miguelselman@microsoft.com, "Oana (GitHub) Dinca" , Oscar Muller , Pilar Blasco , Ramiro Gómez de la Cruz , Ricardo Sastre Martín , Roberto Arocha , Ryan Drewery , Sergio Gallego Martinez , silviahe@microsoft.com, Stéphane Biermann , Tim Guibert +"Alice Anderson" , "Amy Adams (She/Her)" , "Bob Brown" , "Charlie Chen" , david.davis@betasoft.com, "David Dennis" , "Emma Evans, Eric" , emma.edwards@betasoft.com, "Frank Fields, Fiona" , george.garcia@bookings.betasoft.com, george.garcia@betasoft.com, "Grace (AlphaTech) Garcia" , "Henry Harris" , "Iris Ingram" , "Jack Johnson" , "James Jackson" , "Jennifer Jones" , "Kevin Kim" , "Kyle Knight" , lisa.lee@betasoft.com, "Laura Lewis" , "Mark Martinez" "@ $result = Convert-MeetingMembersToMarkdown -MeetingMembers $imput Assert-AreEqual -Presented $result -Expected @" -- Accenture - - "Angulo, Amparo" - - "Mora Alonso, Juan Antonio" - - "Vilanova Arnal, Juan" -- Github - - "Oana (GitHub) Dinca" - - Oscar Muller - - Ryan Drewery - - Stéphane Biermann - - Tim Guibert -- Microsoft - - "Ana González Talaván (She/Her)" - - David Mangas Nuñez - - Felipe Tomazini - - Jose Luis De la Cruz Moreno - - Pilar Blasco - - Ramiro Gómez de la Cruz - - Ricardo Sastre Martín - - Roberto Arocha - - Sergio Gallego Martinez +- Alphatech + - "Grace (AlphaTech) Garcia" + - "Henry Harris" + - "Kevin Kim" + - "Laura Lewis" + - "Mark Martinez" +- Betasoft + - "Amy Adams (She/Her)" + - "Bob Brown" + - "Charlie Chen" + - "David Dennis" + - "Iris Ingram" + - "Jack Johnson" + - "James Jackson" + - "Jennifer Jones" + - "Kyle Knight" +- Deltalab + - "Alice Anderson" + - "Emma Evans, Eric" + - "Frank Fields, Fiona" "@ } \ No newline at end of file