Many users raise questions on how to test chaincode. It used
to be much easier with the old shim, as they could directly
use the old mock stub in the shim. Now that it no longer exists
the fabcar example can provide an example of how to test chaincode.
Also worth noting is our current directory structure of our Go
chaincodes prevents the creation of mocks due to import cycles.
This change also pushes the chaincode logic down into a `chaincode`
package.
Signed-off-by: Brett Logan <brett.t.logan@ibm.com>
Cleans up the code and pushes the smart contract
implementation down into a `chaincode` package.
This is in prep for implementing unit testing in the
chaincode, as you cannot mock code that is part of
the main package.
Signed-off-by: Brett Logan <brett.t.logan@ibm.com>