Functions/Get-MSPCompleteUserToActiveDirectoryUserExtendedPropertyMap.Tests.ps1

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

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

    it "returns the list of user extended properties mapped between MSPComplete and Active Directory" {
        # Call the function
        $output = Get-MSPCompleteUserToActiveDirectoryUserExtendedPropertyMap

        # Verify the output
        (@{
                AddressLine1                    = "streetAddress"
                City                            = "l"
                StateOrProvince                 = "st"
                PostalOrZipCode                 = "postalCode"
                CountryOrRegion                 = "co"
                MobilePhoneNumber               = "mobile"
                TelephoneNumber                 = "telephoneNumber"
                CompanyName                     = "company"
                Department                      = "department"
                JobTitle                        = "title"
                Fax                             = "Fax"
                Office                          = "Office"
                OnPremisesSecurityIdentifier    = "SID"
                DistinguishedName               = "DistinguishedName"
            }).GetEnumerator() | ForEach-Object -Process {
            $output.($_.Key) | Should Be $_.Value
        }
    }
}