ChefAdapterImpl Junits 47/35447/1
authorMichal Kabaj <michal.kabaj@nokia.com>
Tue, 13 Mar 2018 11:18:08 +0000 (12:18 +0100)
committerMichal Kabaj <michal.kabaj@nokia.com>
Tue, 13 Mar 2018 11:18:08 +0000 (12:18 +0100)
commitd206edd8b89ddd251b24e635227fae2814b0152e
tree8b29c086ac731de4154bdda6b4d9fcd71d72333d
parentbbc49d304603dd4cccade55cc5f5711df3024592
ChefAdapterImpl Junits

-Added new Unit tests for ChefAdapterImpl#trigger method
-Refactored ChefAdapterFactory to allow mock injection
-Added new create() method to ChefApiClientFactory which does not set
any Chef specific headers for the purpose of trigger method
-Cleaned up the trigger method - simplified usage, removed useless doFailure
method and inlined its logic and unified HttClient usage -> HttpClient is not
used directly but through existing ChefApiClient
-removed redundant TestChefAdapterImpl tests which have already been rewritten

Change-Id: I830d203877224aa2c5e1b0dff39d1171f1f2f0ef
Issue-ID: APPC-437
Signed-off-by: Michal Kabaj <michal.kabaj@nokia.com>
appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/chefclient/ChefApiClientFactory.java
appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/impl/ChefAdapterFactory.java
appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/impl/ChefAdapterImpl.java
appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/test/java/org/onap/appc/adapter/chef/impl/ChefAdapterImplTest.java
appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/test/java/org/onap/appc/adapter/chef/impl/TestChefAdapterImpl.java [deleted file]