ChefApiClient JUnits 15/31815/3
authorMichal Kabaj <michal.kabaj@nokia.com>
Wed, 14 Feb 2018 11:36:17 +0000 (12:36 +0100)
committerMichal Kabaj <michal.kabaj@nokia.com>
Mon, 19 Feb 2018 09:55:30 +0000 (10:55 +0100)
commitc5281dd38d7f1989bf8750c6072192cdbc46031d
treea4882409621c6506b5d1b39789a803fcb9d88035
parent39b6b136b115e4ee15a599546b23cd9a68f7b673
ChefApiClient JUnits

Add(fix) JUnits for ChefApiClient + refactor.
Junits work on mocked HttpClient instead of attempting to make real calls.
All ChefApiClient methods are now tested.
Improve readability and refactored the ChefApiClient flow (simplified).
Heavily improved SRP in both ChefApiClient and Api request creation.

Change-Id: I997490bf269e7d78b741baf7f8d5d7bf64f6b99a
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/ChefApiClient.java
appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/chefclient/ChefApiClientFactory.java [new file with mode: 0644]
appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/chefclient/ChefApiHeaderFactory.java [new file with mode: 0644]
appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/chefclient/ChefRequestBuilder.java [new file with mode: 0644]
appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/chefclient/ChefResponse.java [new file with mode: 0644]
appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/main/java/org/onap/appc/adapter/chef/chefclient/FormattedTimestamp.java [new file with mode: 0644]
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/chefclient/ChefApiClientTest.java [new file with mode: 0644]
appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/test/java/org/onap/appc/adapter/chef/chefclient/ChefApiHeaderFactoryTest.java [new file with mode: 0644]
appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/test/java/org/onap/appc/adapter/chef/chefclient/FormattedTimestampTest.java [new file with mode: 0644]
appc-adapters/appc-chef-adapter/appc-chef-adapter-bundle/src/test/java/org/onap/appc/adapter/chef/chefclient/TestChefApiClient.java [deleted file]