Skip to content

issue #2569: added model tests for Go#2577

Merged
wing328 merged 3 commits intoswagger-api:masterfrom
guohuang:issue2569
Apr 13, 2016
Merged

issue #2569: added model tests for Go#2577
wing328 merged 3 commits intoswagger-api:masterfrom
guohuang:issue2569

Conversation

@guohuang
Copy link
Copy Markdown
Contributor

@wing328 i have got the test running, but there are couple errors that i cant figure it out, please advise

image

Link #2569

@Override
protected void setExpectations() {
new Expectations(clientCodegen) {{
/* clientCodegen.setModelPackage(GoClientOptionsProvider.MODEL_PACKAGE_VALUE);
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

not sure what this is for, i get additional errors if i enable these lines.

@guohuang
Copy link
Copy Markdown
Contributor Author

@wing328 i finally get everything running, but i am sure some of the fields are not needed, please advise.

@guohuang
Copy link
Copy Markdown
Contributor Author

@wing328 code has been updated per your request, all tests passed

@wing328
Copy link
Copy Markdown
Contributor

wing328 commented Apr 13, 2016

@guohuang thanks for the quick turnaround. I'll take a look and merge accordingly.

@wing328
Copy link
Copy Markdown
Contributor

wing328 commented Apr 13, 2016

@guohuang looks good. I've left some comments for minor enhancements that you can do in another PR.

@wing328 wing328 merged commit 410723d into swagger-api:master Apr 13, 2016
Assert.assertEquals(cm.vars.size(), 0);
// {{imports}} is not used in template
//Assert.assertEquals(cm.imports.size(), 2);
//Assert.assertEquals(Sets.intersection(cm.imports, Sets.newHashSet("Children")).size(), 1);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Unlike PHP, we can test {{imports}} as well, which is used in the Go mustache template.

@guohuang guohuang deleted the issue2569 branch April 15, 2016 02:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants