Package org.jboss.test.xml.mbeanserver.interceptors

Examples of org.jboss.test.xml.mbeanserver.interceptors.SomeBeanInterceptor


      assertTrue("", root instanceof ModelMBeanInfoSupportWrapper);
      ModelMBeanInfoSupportWrapper mbean = (ModelMBeanInfoSupportWrapper) root;
      Descriptor descriptor = mbean.getDescriptors();
      Object i = descriptor.getFieldValue("interceptors");
      Interceptor[] interceptors = (Interceptor[]) i;
      SomeBeanInterceptor sbi = (SomeBeanInterceptor) interceptors[0];
      assertTrue(sbi.isFlag());
      assertTrue("aClass == Integer.class", sbi.getaClass() == Integer.class);
      URL homePage = new URL("http://www.jboss.org/");
      assertTrue("homePage == URL(http://www.jboss.org/)", sbi.getHomePage().equals(homePage));
      Long l = new Long(123456789);
      assertTrue("aLong == 123456789", sbi.getaLong().equals(l));
      assertTrue("aString == string1", sbi.getaString().equals("string1"));
      assertTrue("anInt == 1234", sbi.getAnInt() == 1234);
      InetAddress localhost = InetAddress.getByName("127.0.0.1");
      assertTrue("address == 127.0.0.1", sbi.getAddress().equals(localhost));
      String[] strings = {"string1", "string2", "string3"};
      assertTrue("someStrings == {string1, string2, string3}",
         Arrays.equals(strings, sbi.getSomeStrings()));
      Properties someProperties = new Properties();
      someProperties.setProperty("prop1", "value1");
      someProperties.setProperty("prop2", "value2");
      someProperties.setProperty("prop3", "value3");
      assertTrue("someProperties == {string1, string2, string3}",
         sbi.getSomeProperties().equals(someProperties));

      Object i1 = interceptors[1];
      assertTrue(i1 instanceof PersistenceInterceptor2);
      Object i2 = interceptors[2];
      assertTrue(i2 instanceof ModelMBeanInterceptor);
View Full Code Here

TOP

Related Classes of org.jboss.test.xml.mbeanserver.interceptors.SomeBeanInterceptor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.