You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by GitBox <gi...@apache.org> on 2017/12/13 16:00:28 UTC

[GitHub] houshengbo commented on issue #49: Add code query parameter for action get

houshengbo commented on issue #49: Add code query parameter for action get
URL: https://github.com/apache/incubator-openwhisk-client-go/pull/49#issuecomment-351435363
 
 
   @dubeejw @csantanapr 
   We are definitely able to add the unit tests incrementally. For example, this PR only changes the Get function, so we can start by adding unit tests to this Get function.
   
   Probably, we need to mock s.client.NewRequest and s.client.Do in order to make the tests run.
   Firstly, create an ActionService.
   Then, create the client inside ActionService. I think this step may require some changes for the interface, so that we can create the test implementation of the client in ActionService. client_test.go is an example of the implementation of test in interface.
   Third, we can define how NewRequest and Do are implemented and what they return. Depending on different results they returned, we check the test case succeeds or fails.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services