-
Notifications
You must be signed in to change notification settings - Fork 105
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
Reading traits/properties from xml test-run tree using cache #406
Conversation
- Removed recursion in AddTraitsFromTestNode method. - Cached the class and assembly level traits so that we don't need to traverse the tree again. - Reading test-case, test-suite and assembly level attributes based on the tree structure.
Added a test to check the cache built.
…hod. Thus this will not work with older object models.
Reading tratis/properties from xml test-run tree using cache.
I see you are using the word attributes in several places although the code had nothing to do with attributes. The adapter gets properties from NUnit and creates traits. Some properties (not all) correspond to NUnit attributes but the adapter doesn't know that. |
Based on this line: |
All tests I have thought of have now been added and are green. I have also tested this with comparison to the current adapter on different test code scenarios, and it returns the same. |
Yes, as well as the property. |
@@ -41,24 +40,81 @@ public static void AddTrait(this TestCase testCase, string name, string value) | |||
} | |||
} | |||
|
|||
public static void AddTraitsFromTestNode(this TestCase testCase, XmlNode test) | |||
public static void AddTraitsFromTestNode(this TestCase testCase, XmlNode testNode, IDictionary<string,List<Trait>> propertiesCache) |
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.
nit : should we change the naming convention here also to traitsCache
instead of propertiesCache
.
return string.IsNullOrEmpty(propertyName) || propertyName[0] == '_' || string.IsNullOrEmpty(propertyValue); | ||
} | ||
|
||
private static void AddTraitsToCache(IDictionary<string, List<Trait>> propertiesCache, string key, string propertyName, string propertyValue) |
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.
nit: same as above.
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.
Makes sense.
See #392 and PR #401