test.implementation.modelmbean
Class AttributeCacheTEST

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by test.implementation.modelmbean.AttributeCacheTEST
All Implemented Interfaces:
junit.framework.Test, ModelMBeanConstants, XMBeanConstants

public class AttributeCacheTEST
extends junit.framework.TestCase
implements XMBeanConstants

Tests attribute caching and operation mapping for XMBean.

Version:
$Revision: 81022 $
Author:
Juha Lindfors.

Field Summary
 
Fields inherited from interface org.jboss.mx.modelmbean.XMBeanConstants
DESCRIPTOR, GET_METHOD_ATTRIBUTE, METADATA_DESCRIPTOR_PREFIX, RESOURCE_DESCRIPTOR_PREFIX, RESOURCE_REFERENCE, RESOURCE_TYPE, SAX_PARSER, SET_METHOD_ATTRIBUTE, STANDARD_INTERFACE, STANDARD_MBEAN, XMBEAN_DESCRIPTOR_PREFIX, XML_VALIDATION
 
Fields inherited from interface org.jboss.mx.modelmbean.ModelMBeanConstants
ACTION, ACTION_INFO, ALL_DESCRIPTORS, ATTRIBUTE_DESCRIPTOR, ATTRIBUTE_VALUE, CACHE_ALWAYS, CACHE_ALWAYS_LIMIT, CACHE_NEVER, CACHE_NEVER_LIMIT, CACHED_VALUE, CLASS, CONSTRUCTOR_DESCRIPTOR, CURRENCY_TIME_LIMIT, DEFAULT, DELEGATING_PM_OPERATION_DEFAULT_VALUE, DELEGATING_PM_OPERATION_DESCRIPTOR, DELEGATING_PM_SERVICE_DEFAULT_VALUE, DELEGATING_PM_SERVICE_DESCRIPTOR, DESCRIPTOR_TYPE, DISPLAY_NAME, EXPORT, GENERIC_MODELMBEAN_NOTIFICATION, GET_METHOD, HIGH_VISIBILITY, INFO, INTERCEPTORS, IS_IS, IS_READABLE, IS_WRITABLE, LAST_RETURNED_TIME_STAMP, LAST_UPDATED_TIME_STAMP, LAST_UPDATED_TIME_STAMP2, LOG, LOG_FILE, LOW_VISIBILITY, MBEAN_DESCRIPTOR, MBEAN_INFO_INJECTION_TYPE, MBEAN_SERVER_INJECTION_TYPE, MESSAGE_ID, MINIMAL_VISIBILITY, NAME, NORMAL_VISIBILITY, NOTIFICATION_DESCRIPTOR, OBJECT_NAME, OBJECT_NAME_INJECTION_TYPE, OBJECT_REF, OPERATION_DESCRIPTOR, PERSIST_INFO, PERSIST_LOCATION, PERSIST_NAME, PERSIST_PERIOD, PERSIST_POLICIES, PERSIST_POLICY, PERSISTENCE_MANAGER, PP_ALWAYS, PP_NEVER, PP_NO_MORE_OFTEN_THAN, PP_ON_TIMER, PP_ON_UPDATE, PRESENTATION_STRING, PROTOCOL_MAP, RESOURCE_CLASS, ROLE, ROLE_CONSTRUCTOR, ROLE_GETTER, ROLE_OPERATION, ROLE_SETTER, SET_METHOD, SEVERITY, SEVERITY_CRITICAL, SEVERITY_MAJOR, SEVERITY_MINOR, SEVERITY_NON_RECOVERABLE, SEVERITY_NORMAL, SEVERITY_UNKNOWN, SEVERITY_WARNING, TARGET_OBJECT, TARGET_TYPE, VISIBILITY
 
Constructor Summary
AttributeCacheTEST(String s)
           
 
Method Summary
 void testAttributeChangeNotifications()
          Tests attribute change notifications
 void testCachedAttribute()
          Tests attribute that caches the value for 10 secs.
 void testCachedAttribute2()
          Tests attribute that caches the value for 1 secs.
 void testExplicitDisabledAttributeCaching()
          Tests that attribute values are not cached if currencyTimeLimit = 0 This test uses the xmbean.dtd
 void testImplicitDisabledAttributeCaching()
          Tests that attribute values are not cached if nothing is declared in xml.
 void testNeverStaleAttributeCaching()
          Tests attribute that is never stale (currencyTimeLimit = -1) This test uses the xmbean.dtd
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, 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

AttributeCacheTEST

public AttributeCacheTEST(String s)
Method Detail

testImplicitDisabledAttributeCaching

public void testImplicitDisabledAttributeCaching()
                                          throws Exception
Tests that attribute values are not cached if nothing is declared in xml. This test uses the xmbean.dtd

Throws:
Exception

testExplicitDisabledAttributeCaching

public void testExplicitDisabledAttributeCaching()
                                          throws Exception
Tests that attribute values are not cached if currencyTimeLimit = 0 This test uses the xmbean.dtd

Throws:
Exception

testNeverStaleAttributeCaching

public void testNeverStaleAttributeCaching()
                                    throws Exception
Tests attribute that is never stale (currencyTimeLimit = -1) This test uses the xmbean.dtd

Throws:
Exception

testCachedAttribute

public void testCachedAttribute()
                         throws Exception
Tests attribute that caches the value for 10 secs. This test uses the xmbean.dtd

Throws:
Exception

testCachedAttribute2

public void testCachedAttribute2()
                          throws Exception
Tests attribute that caches the value for 1 secs. This test uses the xmbean.dtd

Throws:
Exception

testAttributeChangeNotifications

public void testAttributeChangeNotifications()
                                      throws Exception
Tests attribute change notifications

Throws:
Exception


Copyright © 2009 JBoss, a division of Red Hat, Inc.. All Rights Reserved.