org.apache.myfaces.renderkit.html.util
Class AddResourceTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.shale.test.base.AbstractJsfTestCase
              extended by org.apache.shale.test.base.AbstractViewControllerTestCase
                  extended by org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase
                      extended by org.apache.myfaces.renderkit.html.util.AddResourceTest
All Implemented Interfaces:
junit.framework.Test

public class AddResourceTest
extends AbstractTomahawkViewControllerTestCase

Unit test for the AddResource class which can output script, style and inline javascript into the header or body of an HTML response page.


Nested Class Summary
static class AddResourceTest.CustomMockExternalContext
           
static class AddResourceTest.RequestHeaderMap
           
static class AddResourceTest.RequestHeaderValuesMap
           
 
Field Summary
 
Fields inherited from class org.apache.shale.test.base.AbstractJsfTestCase
application, config, externalContext, facesContext, facesContextFactory, lifecycle, lifecycleFactory, renderKit, request, response, servletContext, session
 
Constructor Summary
AddResourceTest(String name)
           
 
Method Summary
 void testAddJavaScriptHere()
          Configure a fake JSF environment for a test, consisting of a FacesContext and dependent objects.
 void testGetInstance()
           
 void testWriteWithFullHeader()
           
 
Methods inherited from class org.apache.myfaces.test.AbstractTomahawkViewControllerTestCase
assertIdExists, setUp, tearDown
 
Methods inherited from class org.apache.shale.test.base.AbstractViewControllerTestCase
checkMessageCount, checkMessageCount
 
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

AddResourceTest

public AddResourceTest(String name)
Method Detail

testGetInstance

public void testGetInstance()

testAddJavaScriptHere

public void testAddJavaScriptHere()
                           throws IOException
Configure a fake JSF environment for a test, consisting of a FacesContext and dependent objects.

EasyMock control objects are used to emulate the necessary bits.

Throws:
IOException

testWriteWithFullHeader

public void testWriteWithFullHeader()
                             throws IOException
Throws:
IOException


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