dreamhead/moco — pull request #36 by htynkn (2013-08-23 11:14:00+00:00)
Title: add test for some handlers

Frankly, I'm a little confused about the code with Resource.class、ContentResource.class and ResponseHandlers.class.

The code works well but it looks very strange.

In ResponseHandlers.class we use Resource.class as a parameter,but actually we can use Resource only when we get a VersionResponseHandler.If we want to get ContentHandler we must use ContentResource instead of Resource.

You can see the code in ResponseHandlersTest.If I want to test all,I must prepare two class Resource and ContentResource not only one Resource.

And with the code in ContentHandler.class and VersionResponseHandler.class,they hold different resource.But in ResponseHandlers we use the same resource to construct them.

Is there something wrong with my understanding ? Or there is a better way to organize the code in test file ?

BTW:
Is there a speech about moco in OpenpartyChengdu this Sunday?
I'm looking forward to it~！(^o^)