Commons Email
  1. Commons Email
  2. EMAIL-33

Unit tests and some minor code improvements to [email] project

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: Nightly Builds
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Operating System: other
      Platform: Other

      Description

      Available at the following URL is a JAR file containing minor code
      enhancements (mainly in terms of input checking and so forth) and basic units
      tests. Also included is an ANT build file (no using MAVEN...sorry).
      Using EMMA (http://emma.sourceforge.net) the test coverage with this tests is
      90%+ although I will admit these tests are not as though as they could be.

      http://202.189.48.58:85/corsc/commons-email-1.0.1-dev.jar

      If this post is incorrect please let me know ( this is my first time :-D )

      Thanks.

        Activity

        Corey Scott created issue -
        Hide
        Corey Scott added a comment -

        sorry ... added the URL to the wrong place before

        Show
        Corey Scott added a comment - sorry ... added the URL to the wrong place before
        Hide
        David Eric Pugh added a comment -

        Hi Scott, thanks for the post. Typically when contibutiong, please send in a
        patch file.. most IDE's will create this. Here are some links:

        http://james.apache.org/contribute.html
        http://help.eclipse.org/help30/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/tasks-68c.htm
        http://httpd.apache.org/dev/patches.html

        Show
        David Eric Pugh added a comment - Hi Scott, thanks for the post. Typically when contibutiong, please send in a patch file.. most IDE's will create this. Here are some links: http://james.apache.org/contribute.html http://help.eclipse.org/help30/index.jsp?topic=/org.eclipse.platform.doc.user/tasks/tasks-68c.htm http://httpd.apache.org/dev/patches.html
        Hide
        Corey Scott added a comment -

        ok, thanks for the links.

        I have generated a patch file using eclipse, I dont know if I have done this
        if not please let me know.

        thx

        URLS:
        Patch: http://202.189.48.58:85/corsc/patch.txt
        JAR: http://202.189.48.58:85/corsc/commons-email-1.0.1-dev.jar

        Show
        Corey Scott added a comment - ok, thanks for the links. I have generated a patch file using eclipse, I dont know if I have done this if not please let me know. thx URLS: Patch: http://202.189.48.58:85/corsc/patch.txt JAR: http://202.189.48.58:85/corsc/commons-email-1.0.1-dev.jar
        Hide
        Corey Scott added a comment -

        Created an attachment (id=13132)
        patch file generated with eclipse

        Show
        Corey Scott added a comment - Created an attachment (id=13132) patch file generated with eclipse
        Hide
        David Eric Pugh added a comment -

        Corey.. I was so excited to see unit tests that I went and committed some
        stuff. I didn't see your patch unforutnantly... \

        Take a look at the changes. instead of using the hardcoded d:\ directory, I am
        just using File.createTempfile(), its a nice trick!

        Also, to get around the hardcoded smpt server.. have you looked at dumbster?

        http://quintanasoft.com/dumbster

        I can't seem to get it to build under Ant (I'm a Maven guy), but it might be the
        solution.. let me know...

        THe patch file does look right though.. I'll use it for your next one!

        Eric

        Show
        David Eric Pugh added a comment - Corey.. I was so excited to see unit tests that I went and committed some stuff. I didn't see your patch unforutnantly... \ Take a look at the changes. instead of using the hardcoded d:\ directory, I am just using File.createTempfile(), its a nice trick! Also, to get around the hardcoded smpt server.. have you looked at dumbster? http://quintanasoft.com/dumbster I can't seem to get it to build under Ant (I'm a Maven guy), but it might be the solution.. let me know... THe patch file does look right though.. I'll use it for your next one! Eric
        Hide
        Corey Scott added a comment -

        Created an attachment (id=13140)
        conversion of tests to include dumbster and minor code changes with better input checking

        Show
        Corey Scott added a comment - Created an attachment (id=13140) conversion of tests to include dumbster and minor code changes with better input checking
        Hide
        Corey Scott added a comment -

        New patch file for unit tests

        Includes:
        -Minor code changes to improve input checking
        -Use of Dumbster to replace the need for an email server to run the tests
        -Reset of the formatting for the tests (back to same style as the original
        code)

        Show
        Corey Scott added a comment - New patch file for unit tests Includes: -Minor code changes to improve input checking -Use of Dumbster to replace the need for an email server to run the tests -Reset of the formatting for the tests (back to same style as the original code)
        Hide
        David Eric Pugh added a comment -

        Can you email me the jar for dumbster? Unforutnantly, I can't get it to build.
        Also, have you looked at Maven? Without going into an major discussion, Maven
        does everything that your build.xml does.. A lot of the commons projects use it
        as well.

        Show
        David Eric Pugh added a comment - Can you email me the jar for dumbster? Unforutnantly, I can't get it to build. Also, have you looked at Maven? Without going into an major discussion, Maven does everything that your build.xml does.. A lot of the commons projects use it as well.
        Hide
        Corey Scott added a comment -

        Created an attachment (id=13209)
        updated tests (see other comments for details)

        Show
        Corey Scott added a comment - Created an attachment (id=13209) updated tests (see other comments for details)
        Hide
        Corey Scott added a comment -

        new patch improvements:
        -better integration with Dumbster(v1.3)
        -externalized the test config
        -formatting changes to original style

        Show
        Corey Scott added a comment - new patch improvements: -better integration with Dumbster(v1.3) -externalized the test config -formatting changes to original style
        Hide
        David Eric Pugh added a comment -

        I had to apply the fixes by hand. I didn't apply the ant build script, since
        you said you where getting up to speed on Maven, and I rather support only one
        build. I also didn't apply all of the externalized test config. You forgot to
        supply the actual singleton file! So I tossed in my own. Unless there is a
        reason that you would want to change externally the test config, I don't see a
        reason to use it. It just adds more complexity to the test process.

        Also, as far as the reformatting goes, please send that in as a totally seperate
        bug. It needs to be a seperate patch completely because of the noise issue in
        the CVS diff log. also, at this point what I have committed I think has
        diveraged significantly from what you have .

        Thanks for the work, and I'll plow through the other issues.

        Show
        David Eric Pugh added a comment - I had to apply the fixes by hand. I didn't apply the ant build script, since you said you where getting up to speed on Maven, and I rather support only one build. I also didn't apply all of the externalized test config. You forgot to supply the actual singleton file! So I tossed in my own. Unless there is a reason that you would want to change externally the test config, I don't see a reason to use it. It just adds more complexity to the test process. Also, as far as the reformatting goes, please send that in as a totally seperate bug. It needs to be a seperate patch completely because of the noise issue in the CVS diff log. also, at this point what I have committed I think has diveraged significantly from what you have . Thanks for the work, and I'll plow through the other issues.
        Henri Yandell made changes -
        Field Original Value New Value
        issue.field.bugzillaimportkey 31762 12341811
        Henri Yandell made changes -
        Key COM-1659 EMAIL-33
        Project Commons [ 12310458 ] Commons Email [ 12310474 ]
        Component/s Email [ 12311114 ]
        Assignee Jakarta Commons Developers Mailing List [ commons-dev@jakarta.apache.org ]
        Affects Version/s 1.0 Alpha [ 12311665 ]
        Henri Yandell made changes -
        Affects Version/s 1.0 Alpha [ 12311833 ]
        Siegfried Goeschl made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Corey Scott
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development