Functions/Get-MSPCompleteUserToAzureADUserExtendedPropertyMap.Tests.ps1

describe "BitTitan.Runbooks.MSPComplete/Get-MSPCompleteUserToAzureADUserExtendedPropertyMap" -Tags "module", "unit" {

    # Import the function to test
    . "$($PSScriptRoot)\Get-MSPCompleteUserToAzureADUserExtendedPropertyMap.ps1"

    it "returns the list of user extended properties mapped between MSPComplete and Azure AD" {
        # Call the function
        $output = Get-MSPCompleteUserToAzureADUserExtendedPropertyMap

        # Verify the output
        (@{
            AddressLine1                    = "StreetAddress"
            City                            = "City"
            StateOrProvince                 = "StateOrProvince"
            PostalOrZipCode                 = "PostalCode"
            CountryOrRegion                 = "CountryOrRegion"
            MobilePhoneNumber               = "MobilePhone"
            TelephoneNumber                 = "HomePhone"
            CompanyName                     = "Company"
            Department                      = "Department"
            JobTitle                        = "Title"
            OnPremisesSecurityIdentifier    = "OnPremisesSecurityIdentifier"
        }).GetEnumerator() | ForEach-Object -Process {
            $output.($_.Key) | Should Be $_.Value
        }
    }
}