org.apache.myfaces.custom.transform
Class XmlTransformTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.myfaces.test.base.AbstractJsfTestCase
              extended by org.apache.myfaces.custom.transform.XmlTransformTest
All Implemented Interfaces:
junit.framework.Test

public class XmlTransformTest
extends org.apache.myfaces.test.base.AbstractJsfTestCase

Test case for XmlTransform

Author:
Sean Schofield

Field Summary
 
Fields inherited from class org.apache.myfaces.test.base.AbstractJsfTestCase
application, config, externalContext, facesContext, facesContextFactory, lifecycle, lifecycleFactory, renderKit, request, response, servletContext, session
 
Constructor Summary
XmlTransformTest(String name)
          Constructor
 
Method Summary
 void setUp()
          See abstract class
static junit.framework.Test suite()
           
 void testContent()
           
 void testContentLocation()
           
 void testContentLocationValueBinding()
           
 void testContentStream()
          Tests the actual transformation process using an InputStream as the source for content.
 void testContentStreamValueBinding()
          Tests the actual transformation process using an InputStream as the source for content.
 void testContentValueBinding()
           
 void testNoTransformInfo()
          Component should throw NPE if no stylesheet or Transform is provided
 void testSaveAndRestoreState()
          Test the save and restore state methods.
 void testSaveAndRestoreStateValueBinding()
          Test the save and restore state methods with all values as value binding expressions.
 void testSetContent()
           
 void testSetContentStream()
           
 void testSetContentStreamValueBinding()
           
 void testSetStylesheet()
           
 void testStyleSheet()
           
 void testStylesheetLocation()
           
 void testStylesheetLocationValueBinding()
           
 void testStylesheetNoContent()
          Component should throw NPE if no content is provided
 void testStylesheetStream()
           
 void testStylesheetStreamValueBinding()
           
 void testStyleSheetValueBinding()
           
 
Methods inherited from class org.apache.myfaces.test.base.AbstractJsfTestCase
setFactories, setUpApplication, setUpExternalContext, setUpFacesContext, setUpJSFObjects, setUpLifecycle, setUpRenderKit, setUpServletObjects, setUpView, 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
 

Constructor Detail

XmlTransformTest

public XmlTransformTest(String name)
Constructor

Parameters:
name - String
Method Detail

setUp

public void setUp()
           throws Exception
See abstract class

Overrides:
setUp in class org.apache.myfaces.test.base.AbstractJsfTestCase
Throws:
Exception

testSaveAndRestoreState

public void testSaveAndRestoreState()
Test the save and restore state methods.


testSaveAndRestoreStateValueBinding

public void testSaveAndRestoreStateValueBinding()
Test the save and restore state methods with all values as value binding expressions. This also tests the value bindings themselves to make sure they are working.


testSetContent

public void testSetContent()

testSetContentStream

public void testSetContentStream()

testSetContentStreamValueBinding

public void testSetContentStreamValueBinding()

testSetStylesheet

public void testSetStylesheet()

testNoTransformInfo

public void testNoTransformInfo()
                         throws IOException
Component should throw NPE if no stylesheet or Transform is provided

Throws:
IOException

testStylesheetNoContent

public void testStylesheetNoContent()
                             throws IOException
Component should throw NPE if no content is provided

Throws:
IOException

testStyleSheet

public void testStyleSheet()
                    throws IOException
Throws:
IOException

testStyleSheetValueBinding

public void testStyleSheetValueBinding()
                                throws IOException
Throws:
IOException

testStylesheetLocation

public void testStylesheetLocation()
                            throws IOException
Throws:
IOException

testStylesheetLocationValueBinding

public void testStylesheetLocationValueBinding()
                                        throws IOException
Throws:
IOException

testStylesheetStream

public void testStylesheetStream()
                          throws IOException
Throws:
IOException

testStylesheetStreamValueBinding

public void testStylesheetStreamValueBinding()
                                      throws IOException
Throws:
IOException

testContent

public void testContent()
                 throws IOException
Throws:
IOException

testContentValueBinding

public void testContentValueBinding()
                             throws IOException
Throws:
IOException

testContentLocation

public void testContentLocation()
                         throws IOException
Throws:
IOException

testContentLocationValueBinding

public void testContentLocationValueBinding()
                                     throws IOException
Throws:
IOException

testContentStream

public void testContentStream()
                       throws IOException
Tests the actual transformation process using an InputStream as the source for content.

Throws:
IOException

testContentStreamValueBinding

public void testContentStreamValueBinding()
                                   throws IOException
Tests the actual transformation process using an InputStream as the source for content. This test sets the property to a value binding (as you would through use of XmlTransformTag) instead of setting the value of the contentStream on the component directly.

Throws:
IOException

suite

public static junit.framework.Test suite()


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.