Commons Email
  1. Commons Email
  2. EMAIL-27

[email] further improvements to test code and removal of emails validation

    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

      Changes list:

      Email
      ---------------------
      -Removed Email validation
      -changed (back) to getInstance due to security exceptions caused when testing
      using maven
      -In setFrom(String email, String name) changed the checking to
      StringUtils.isNotEmpty
      -Fixed some incorrect logic in testing for charset in:
      addTo(String email, String name)
      addCc(String email, String name)
      addBcc(String email, String name)
      addReplyTo(String email, String name)

      Mulitpart Email
      ---------------------
      -Corrected style errors involving imports
      -Added validation to disallow null message contents in setMsg(String msg)
      -Removed redundant if statment from send() to streamline the function
      -Added validation to disallow null attachements to attach(EmailAttachment
      attachment)
      -Added URL validation for attach(URL url, String name, String description,
      String disposition)
      -Added Datasource validation for attach( DataSource ds, String name, String
      description)
      -Removed redundant if statement from getPrimaryBodyPart() as the code was a
      duplicate of code inside init()

      EmailAttachmentTest
      ---------------------
      -Coding style changes only

      EmailTest
      ---------------------
      -Added test for the Get/Set session
      -Minor Coding style changes
      -Added exception test for the person param to all relevant address functions
      -Added the server port as a configurable var and added it as a static property
      -Added code to set the configured port during tests

      HtmlEmailTest
      ---------------------
      -Minor Coding style changes
      -Added the server port as a configurable var and added it as a static property
      -Added code to set the configured port during tests

      MulitpartEmailTest
      ---------------------
      -Minor Coding style changes
      -Added the server port as a configurable var and added it as a static property
      -Added code to set the configured port during tests
      -Removed the hard coded test url and added reference to the configuration
      class instead
      -Added test for init

      SimpleEmailTest
      ---------------------
      -added apache license
      -Minor Coding style changes
      -Added the server port as a configurable var and added it as a static property
      -Added code to set the configured port during tests

      EmailConfiguration
      ---------------------
      -added apache license
      -Minor Coding style changes
      -changed the test url to a active url

      MockEmailConcrete
      ---------------------
      -added apache license
      -Minor Coding style changes
      -added function to help test get/set session

      MockHtmlEmailConcrete
      ---------------------
      -added apache license

      MockMulitPartEmailConcrete
      ---------------------
      -added apache license
      -added test for init function

      MockHtmlEmailConcrete
      ---------------------
      -added apache license

        Activity

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development