commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Benedikt Ritter (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CHAIN-88) Refactor tests in class ContextBaseTestCase
Date Sat, 15 Jun 2013 14:04:20 GMT

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

Benedikt Ritter resolved CHAIN-88.
----------------------------------

    Resolution: Fixed
      Assignee: Benedikt Ritter

Hello Stephan,

I have applied your patch. Just two comments:
* The patch still included tab characters. Please double check your IDE config ;)
* There was still a change in {{testSerialization()}}. I have reverted this change.

Your changes have been applied in [r1493355|http://svn.apache.org/viewvc?view=revision&revision=r1493355].

Regarding hamcrest: I'm not to crazy about hamcrest. I like it where it makes sense. For me
{{assertEquals(expected, actual)}} is as good as {{assertThat(val, is(expected)}}. But {{assertThat(col,
hasSize(3))}} is much better than {{assertEquals(3, col.size()}}.
If you have the spare time, feel free to change what ever you like from traditional asserts
to assertThat.

Maybe it makes sense to provide custom matchers for the {{checkXXX}} methods in {{ContextBaseTestCase}}.
I believe we use methods like this in several places. Before jumping in such a change, it
makes sense to bring a discussion about this up on the ML.

Thanks a lot for contributing to commons!
                
> Refactor tests in class ContextBaseTestCase 
> --------------------------------------------
>
>                 Key: CHAIN-88
>                 URL: https://issues.apache.org/jira/browse/CHAIN-88
>             Project: Commons Chain
>          Issue Type: Task
>    Affects Versions: 2.0
>            Reporter: Stephan K├Âninger
>            Assignee: Benedikt Ritter
>            Priority: Minor
>              Labels: patch
>         Attachments: CHAIN-88-1-patch.txt, CHAIN-88-2-patch.txt, CHAIN-88-patch.txt
>
>
> Some tests in ContextBaseTestCase contain strange code which is much too complicated
or seems unnecessary. I have created a patch to address this issues. All tests run on my machine
after applying the patches.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message