SOAj Consolidated


info.soaj.core.unittest.internal
Class SjPluginTextEmailExampleTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by info.soaj.core.unittest.SjBaseOutsideContainerTestCase
              extended by info.soaj.core.unittest.internal.SjPluginTextEmailExampleTest
All Implemented Interfaces:
junit.framework.Test

public class SjPluginTextEmailExampleTest
extends SjBaseOutsideContainerTestCase

This is a unit test class.

Copyright (c) 2006 - 2009 by Global Technology Consulting Group, Inc. at gtcGroup.com .

Since:
v. 1.0
Author:
MarvinToll@gtcGroup.com

Field Summary
private  SjAbstractPluginEmail emailPlugin
          UID
private static long serialVersionUID
          UID
 
Fields inherited from class info.soaj.core.unittest.SjBaseOutsideContainerTestCase
descriptorDocumentStatus, NO_DESCRIPTOR_DOCUMENT_REQUIRED, startTime, USE_DEFAULT_DESCRIPTOR_DOCUMENT
 
Constructor Summary
SjPluginTextEmailExampleTest()
           
 
Method Summary
protected  java.lang.String initCB()
           This callback method is invoked upon construction and establishes the descriptor document used for each unit test method following the clearing of plugin cache.
private  java.lang.String readMailServerPassword()
          Reads property for mail server password.
protected  void setUp()
          Callback method for every test.
 void testSendTextEmail_mostlyDeclarative()
          This method tests text email.
 void testSendTextEmail_mostlyProgramatic()
          This method tests text email.
 
Methods inherited from class info.soaj.core.unittest.SjBaseOutsideContainerTestCase
assertException, assertExceptionContext, fail, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
UID

See Also:
Constant Field Values

emailPlugin

private SjAbstractPluginEmail emailPlugin
UID

Constructor Detail

SjPluginTextEmailExampleTest

public SjPluginTextEmailExampleTest()
Method Detail

initCB

protected java.lang.String initCB()

This callback method is invoked upon construction and establishes the descriptor document used for each unit test method following the clearing of plugin cache.

Many unit tests do not have plugin activation dependencies and therefore do not require descriptor document parsing. In that case, return:

 ----> NO_DESCRIPTOR_DOCUMENT_REQUIRED
 
If the default descriptor document is required then return:
 ----> USE_DEFAULT_DESCRIPTOR_DOCUMENT
 
If a custom descriptor document (on the classpath) is needed then return a String similar to:
 ----> "soaj-myplugin-example-properties-test.xml"
 

Specified by:
initCB in class SjBaseOutsideContainerTestCase
Returns:
String - The name of the descriptor document (on the classpath) or USE_DEFAULT_DESCRIPTOR_DOCUMENT or NO_DESCRIPTOR_DOCUMENT_REQUIRED.

setUp

protected void setUp()
              throws java.lang.Exception
Callback method for every test.

Overrides:
setUp in class SjBaseOutsideContainerTestCase
Throws:
java.lang.Exception
See Also:
SjBaseOutsideContainerTestCase.setUp()

testSendTextEmail_mostlyProgramatic

public void testSendTextEmail_mostlyProgramatic()
                                         throws java.io.FileNotFoundException,
                                                java.io.IOException
This method tests text email.

Throws:
java.io.IOException
java.io.FileNotFoundException

testSendTextEmail_mostlyDeclarative

public void testSendTextEmail_mostlyDeclarative()
                                         throws java.io.FileNotFoundException,
                                                java.io.IOException
This method tests text email.

Throws:
java.io.IOException
java.io.FileNotFoundException

readMailServerPassword

private java.lang.String readMailServerPassword()
                                         throws java.io.FileNotFoundException,
                                                java.io.IOException
Reads property for mail server password.

Returns:
String The value.
Throws:
java.io.IOException
java.io.FileNotFoundException

SOAj Consolidated


Copyright (c) 2006 - 2009 by Global Technology Consulting Group, Inc. at gtcGroup.com.
Use is authorized, provided the source is acknowledged by inclusion of this copyright notice.