[GitHub] ant-ivy pull request #31: Convert tests to JUnit 4, clean up code

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] ant-ivy pull request #31: Convert tests to JUnit 4, clean up code

apupier
GitHub user twogee opened a pull request:

    https://github.com/apache/ant-ivy/pull/31

    Convert tests to JUnit 4, clean up code

    JUnit 4 has primarily two benefits, clarity through annotations and more fine grained control of failures

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/twogee/ant-ivy master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/ant-ivy/pull/31.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #31
   
----
commit 1543f528963246eacfdc3228d716d78ceba824b3
Author: twogee <[hidden email]>
Date:   2017-05-25T15:25:59Z

    Convert tests to JUnit 4, clean up code

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] ant-ivy issue #31: Convert tests to JUnit 4, clean up code

apupier
Github user janmaterne commented on the issue:

    https://github.com/apache/ant-ivy/pull/31
 
    That was a lot of work (or writing/using a transformator ;)
    Basically it
    - removes the "extends TestCase" and
    - uses JUnit annotations
    - change string.indexOf()!=-1 to string.contains()
    - use foreach instead of for-i
    - small improvements
    - spell check
   
    test/java/org/apache/ivy/ant/IvyCacheFilesetTest.java
    In testFailure() you use @Test(expect=BuildException.class). Therefor the last fail() statement is obsolete.
   
    This pattern occurs several more times.
    Could you change that?
   
    Nice use of @Rule ExpectedException in IvyCleanCacheTest.
    Could you use that in IvyConfigureTest#testOverrideNotAllowed() and Co?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] ant-ivy issue #31: Convert tests to JUnit 4, clean up code

apupier
In reply to this post by apupier
Github user twogee commented on the issue:

    https://github.com/apache/ant-ivy/pull/31
 
    Thanks for a nice summary and pointing out a paradigm that I did not investigate entirely. The essential work also included checking that all appropriate setUp() and tearDown() were public and/or necessary.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] ant-ivy issue #31: Convert tests to JUnit 4, clean up code

apupier
In reply to this post by apupier
Github user twogee commented on the issue:

    https://github.com/apache/ant-ivy/pull/31
 
    I left a few `fail()`s where multiple assertions were made; I guess that requires a custom @Rule.
   
    Also, in `FileSystemResolverTest`, I moved `finally` blocks to `tearDown()`. Strangely, that caused failures in `testPublishTransactionWithDottedOrganisation()` because of leftover files, so I added extra cleanup in `tearDown()`.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] ant-ivy issue #31: Convert tests to JUnit 4, clean up code

apupier
In reply to this post by apupier
Github user janmaterne commented on the issue:

    https://github.com/apache/ant-ivy/pull/31
 
    Nice idea to use the old fail-Message as new method comment to document why the exception is expected.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] ant-ivy pull request #31: Convert tests to JUnit 4, clean up code

apupier
In reply to this post by apupier
Github user asfgit closed the pull request at:

    https://github.com/apache/ant-ivy/pull/31


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] ant-ivy issue #31: Convert tests to JUnit 4, clean up code

apupier
In reply to this post by apupier
Github user janmaterne commented on the issue:

    https://github.com/apache/ant-ivy/pull/31
 
    merged, thanks


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] ant-ivy issue #31: Convert tests to JUnit 4, clean up code

apupier
In reply to this post by apupier
Github user nlalevee commented on the issue:

    https://github.com/apache/ant-ivy/pull/31
 
    @twogee to properly add you to the list of contributors, do you confirm you are
    Gintautas Grigelionis ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] ant-ivy issue #31: Convert tests to JUnit 4, clean up code

apupier
In reply to this post by apupier
Github user twogee commented on the issue:

    https://github.com/apache/ant-ivy/pull/31
 
    I do 😃


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...