Skip to content
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 custom parameters in annotations #36

Merged
merged 2 commits into from
Jul 2, 2019
Merged

Reading custom parameters in annotations #36

merged 2 commits into from
Jul 2, 2019

Conversation

Grigory-Rylov
Copy link
Owner

Now TestPlanElement has array of list of AnnotationInfo

this.methodName = methodName;
this.className = fullClassName;
this.annotations = annotations;
type = (methodName == null || methodName.length() == 0) ?
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TextUtils.isEmpty() btw

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@@ -70,7 +65,7 @@ public String getClassName() {
return className;
}

public List<String> getAnnotations() {
public List<AnnotationInfo> getAnnotations() {
return new ArrayList<>(annotations);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to use Collections.unmodifiableList here

Assert.assertEquals(1, flags.size());
Assert.assertEquals("com.github.grishberg.annotaions.Feature", annotations.get(0));
Assert.assertEquals("flag1=value1", flags.get(0));
Assert.assertEquals("someParam=someValue", annotationMember.getStrValue());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need also tests for int, string[], int[]

for_test/am_instrument_output.txt Outdated Show resolved Hide resolved
for_test/am_instrument_output.txt Outdated Show resolved Hide resolved
@Grigory-Rylov Grigory-Rylov merged commit 181c65a into master Jul 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants