You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Brian Eaton (JIRA)" <ji...@apache.org> on 2008/06/07 23:41:45 UTC

[jira] Updated: (SHINDIG-364) provide reusable tests for injected dependencies

     [ https://issues.apache.org/jira/browse/SHINDIG-364?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Eaton updated SHINDIG-364:
--------------------------------

    Attachment: testing-package.patch

Work done in this patch:

1) Create a shindig-testing artifact that can be published for inclusion in other projects.  None of the other shindig artifacts should depend on shindig-testing.
2) Move generic HttpFetcher tests into the shindig-testing 'main' code.
3) Move BasicHttpFetcher test case into the shindig-testing 'test' code.

This looks like it might work for allowing reuse of the test cases, but is slightly weird.  Why do we have BasicHttpFetcherTest.java in a completely different location than BasicHttpFetcher?

> provide reusable tests for injected dependencies
> ------------------------------------------------
>
>                 Key: SHINDIG-364
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-364
>             Project: Shindig
>          Issue Type: Bug
>          Components: Gadget Rendering Server (Java)
>            Reporter: Brian Eaton
>         Attachments: testing-package.patch
>
>
> Problem: dependencies injected in to Shindig are expected to fulfill contracts that are not completely specified by their interfaces.  For example, HttpFetcher implementations need to support GET, PUT, POST, and DELETE methods, and also need to return the body of HTTP error responses.
> It's easy to write test cases for this for any particular HttpFetcher implementation (we have them for BasicHttpFetcher), but it is slightly trickier to reuse those test cases against other HttpFetcher implementations.  Quite a bit of this trickiness is introduced by maven, unfortunately.
> I'm attaching a patch that takes a first swing at artifact creation and renaming to allow the BasicHttpFetcherTest test cases to be reused for arbitrary HTTP fetchers.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.