Functions/Get-MSPCompleteUserToExchangeOnlineUserExtendedPropertyMap.Tests.ps1

describe "BitTitan.Runbooks.MSPComplete/Get-MSPCompleteUserToExchangeOnlineUserExtendedPropertyMap" -Tag "module", "unit" {

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

    it "returns the list of user extended properties mapped between MSPComplete and Exchange Online" {
        # Call the function
        $output = Get-MSPCompleteUserToExchangeOnlineUserExtendedPropertyMap

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