added tests for primitive types, dictionary type, and enumerable type for convertto-xml#4503
Merged
adityapatwardhan merged 2 commits intoPowerShell:masterfrom Aug 16, 2017
Merged
Conversation
anmenaga
suggested changes
Aug 4, 2017
| $x.Objects.Object."#text" | Should BeExactly $i | ||
| } | ||
|
|
||
| It "Serialize dictionary type" { |
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 ) ?
Member
Author
There was a problem hiding this comment.
yeah, that's a mistake
adityapatwardhan
approved these changes
Aug 7, 2017
adityapatwardhan
requested changes
Aug 7, 2017
Member
adityapatwardhan
left a comment
There was a problem hiding this comment.
Please fix CI errors.
Member
|
CI failing with: Expected string length 5 but was 27. Strings differ at index 0. |
176a129 to
005aa87
Compare
Member
Author
|
@anmenaga @adityapatwardhan feedback addressed |
adityapatwardhan
approved these changes
Aug 14, 2017
Member
|
@anmenaga Can you have a look? |
anmenaga
approved these changes
Aug 15, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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