Functions/ConvertFrom-SymbolSeparatedValues.Tests.ps1
describe "BitTitan.Runbooks.Common/ConvertFrom-SymbolSeparatedValues" -Tag "module", "unit" { # Import the function to test . "$($PSScriptRoot)\ConvertFrom-SymbolSeparatedValues.ps1" it "separates the values without trimming the values or ignoring null or whitespace values" { # Call the function $output = ConvertFrom-SymbolSeparatedValues "1, 2, " "," -TrimValues:$false -IgnoreNullOrWhitespace:$false # Verify the output $output | Should Be @("1", " 2", " ") } it "separates the values, trimming the values and without ignoring null or whitespace values" { # Call the function $output = ConvertFrom-SymbolSeparatedValues "1, 2, " "," -IgnoreNullOrWhitespace:$false # Verify the output $output | Should Be @("1", "2", "") } it "separates the values, trimming the values and ignoring null or whitespace values" { # Call the function $output = ConvertFrom-SymbolSeparatedValues "1, 2, " "," # Verify the output $output | Should Be @("1", "2") } } |