-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed feature test for XmlAttributeProperties.GetXmlNamespaceMaps and XmlAttributeProperties.SetXmlNamespaceMaps #264
base: main
Are you sure you want to change the base?
Conversation
try | ||
{ | ||
XmlAttributeProperties.SetXmlNamespaceMaps(dobj, "foo"); | ||
//Pass null to both dependencyObject and value in SetXmlNamespaceMaps, this will throw exception | ||
XmlAttributeProperties.SetXmlNamespaceMaps(null, null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we are testing whether SetXmlNamespaceMaps
throws exception when setting null instead of testing if we can set the namespace maps with a correct value.
I am not aware if we have such a test case already. If not, I think we should add one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we are testing for null value just to see if it results in exception or not because SetXmlNamespaceMaps
will throw exception in that scenario.
However for the correct value test we are checking that as well, please refer the code snippet from line 237 to 262.
try | ||
{ | ||
XmlAttributeProperties.GetXmlNamespaceMaps(dobj); | ||
//Pass null to dependencyObject in GetXmlNamespaceMaps, this will throw exception | ||
XmlAttributeProperties.GetXmlNamespaceMaps(null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here as well I think we should have a test case where we test whether we can get the correct value from the namespace maps or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please refer the code snippet from line 237 to 262.
Description
Fixed feature test for issue : XmlAttributeProperties.GetXmlNamespaceMaps throws System.InvalidCastException
Regression
None
Testing
Internal testing done, no new failures encountered.
Risk
None
Microsoft Reviewers: Open in CodeFlow