-
Notifications
You must be signed in to change notification settings - Fork 323
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
Added constants for hierarchical naming #2724
Conversation
Haplois
commented
Feb 1, 2021
- Added constants for hierarchical naming.
- Reduced dependency surface of the AdapterUtilities package.
We're adding a TestProperty to store multiple levels of a name. I am calling it
|
4404196
to
fb4c26e
Compare
I'm ok with the name In the case of a "Fact" test, you would have a Namespace/Class/(blank)/DisplayName and in the case of a "Theory" test you would have a Namespace/Class/TestGroup/DisplayName where TestGroup captures the "test method" level and DisplayName would be different for each data driven test case. The way we handle this today in the test hierarchy is if there is only one DisplayName in a TestGroup, then the TestGroup level is removed. |
What about using just the name |
src/Microsoft.TestPlatform.AdapterUtilities/HierarchicalNamingConstants.cs
Outdated
Show resolved
Hide resolved
Sounds better. |
fb4c26e
to
6572ef1
Compare
6572ef1
to
31b4729
Compare
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.
Looks good with a few minor changes.
src/Microsoft.TestPlatform.AdapterUtilities/ManagedNameUtilities/Contants.cs
Outdated
Show resolved
Hide resolved
/// <summary> | ||
/// Meanings of the indices in the Hierarchy array. | ||
/// </summary> | ||
public static class Levels |
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.
Could the HierarchyName property be a dictionary instead, so both setting/retrieving is easier to understand and uniqueness of values is guaranteed? We could serialize/deserialise this the way we want internally,
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.
Do you mean like a <string, string>
directory with set keys on the adapter?
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.
Gosh, I dont have a good way of responding to notifications from github. Yes, I meant a <string,string> property bag.
/cc : @Haplois
- Added constants for hierarchical naming. - Reduced dependency surface of the AdapterUtilities package.
31b4729
to
5091dd2
Compare