added tests for primitive types, dictionary type, and enumerable type for convertto-xml#4503
Conversation
There was a problem hiding this comment.
If you're using terminology from the source code, then I would call this test
"Serialize ContainerType.Dictionary type"
| $x.Objects.Object.Property[1]."#text" | Should BeExactly "bar" | ||
| } | ||
|
|
||
| It "Serialize enumerable type" { |
There was a problem hiding this comment.
Like above; maybe rename the test to "Serialize ContainerType.Enumerable type"
| $fruit2.name = "banana" | ||
| $x = $fruit1,$fruit2 | ConvertTo-Xml | ||
| $x.Objects.Object.Count | Should BeExactly 2 | ||
| $x.Objects.Object[0].Type = "fruit" |
There was a problem hiding this comment.
For this line and below:
Are these assignments ("=") meant to be verifications ( | Should ) ?
There was a problem hiding this comment.
yeah, that's a mistake
adityapatwardhan
left a comment
There was a problem hiding this comment.
Please fix CI errors.
|
CI failing with: Expected string length 5 but was 27. Strings differ at index 0. |
176a129 to
005aa87
Compare
|
@anmenaga @adityapatwardhan feedback addressed |

Based on https://codecov.io/gh/PowerShell/PowerShell/src/master/src/Microsoft.PowerShell.Commands.Utility/commands/utility/CustomSerialization.cs
Since I'm going to be on vacation, I'm submitting PR now rather than when I finish going through the whole file