issue #2569: added model tests for Go#2577
Merged
wing328 merged 3 commits intoswagger-api:masterfrom Apr 13, 2016
Merged
Conversation
| @Override | ||
| protected void setExpectations() { | ||
| new Expectations(clientCodegen) {{ | ||
| /* clientCodegen.setModelPackage(GoClientOptionsProvider.MODEL_PACKAGE_VALUE); |
Contributor
Author
There was a problem hiding this comment.
not sure what this is for, i get additional errors if i enable these lines.
Contributor
Author
|
@wing328 i finally get everything running, but i am sure some of the fields are not needed, please advise. |
Contributor
Author
|
@wing328 code has been updated per your request, all tests passed |
Contributor
|
@guohuang thanks for the quick turnaround. I'll take a look and merge accordingly. |
Contributor
|
@guohuang looks good. I've left some comments for minor enhancements that you can do in another PR. |
| 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); |
Contributor
There was a problem hiding this comment.
Unlike PHP, we can test {{imports}} as well, which is used in the Go mustache template.
This was referenced Apr 19, 2017
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@wing328 i have got the test running, but there are couple errors that i cant figure it out, please advise
Link #2569