Examples of TestClass


Examples of de.odysseus.el.test.TestClass

  public long bar(long value) {
    return value;
  }

  public TestClass getTestClass() {
    return new TestClass();
  }
View Full Code Here

Examples of grails.validation.TestClass

        Constraint constraint = getConstraint("testBigDecimal", scale);
        assertEquals(new BigDecimal(result), proceedValidation(constraint, new BigDecimal(value)));
    }

    private Object proceedValidation(Constraint constraint, Object value) {
        BeanWrapper constrainedBean = new BeanWrapperImpl(new TestClass());
        constrainedBean.setPropertyValue(constraint.getPropertyName(), value);
        Errors errors = new BindException(constrainedBean.getWrappedInstance(), constrainedBean.getWrappedClass().getName());
        assertFalse(errors.hasErrors());
        constraint.validate(constrainedBean.getWrappedInstance(), value, errors);
        return constrainedBean.getPropertyValue(constraint.getPropertyName());
View Full Code Here

Examples of javax.el.test.TestClass

    }
  }

  public void testInvoke2() {
    BeanELResolver resolver = new BeanELResolver();
    assertEquals(42, resolver.invoke(context, new TestClass().getAnonymousTestInterface(), "getFourtyTwo", null, new Class[]{}));
    assertEquals(42, resolver.invoke(context, new TestClass().getNestedTestInterface(), "getFourtyTwo", null, new Class[]{}));
    assertEquals(42, resolver.invoke(context, new TestClass().getNestedTestInterface2(), "getFourtyTwo", null, new Class[]{}));
  }
View Full Code Here

Examples of org.apache.aries.jmx.whiteboard.integration.helper.TestClass

    @Test
    public void test_simple_MBean() throws Exception {
        final String instanceName = "simple.test.instance";
        final String objectNameString = "domain:instance=" + instanceName;
        final ObjectName objectName = new ObjectName(objectNameString);
        final TestClass testInstance = new TestClass(instanceName);

        final MBeanServer server = getStaticMBeanServer();

        // expect MBean to not be registered yet
        assertNotRegistered(server, objectName);
View Full Code Here

Examples of org.apache.fulcrum.json.TestClass

        String serJson = sc.ser(new JacksonMapperTest("mytest"));
        assertEquals("Set failed ", "{\"name\":\"mytest\"}", serJson);
    }

    public void testDeSerialize() throws Exception {
        String serJson = sc.ser(new TestClass("mytest"));
        Object deson = sc.deSer(serJson, TestClass.class);
        assertEquals("DeSer failed ", TestClass.class, deson.getClass());
    }
View Full Code Here

Examples of org.jboss.arquillian.spi.TestClass

      if(deployment == null)
      {
         return;
      }
     
      TestClass testClass = event.getTestClass();
      String deploymentContent = deployment.toString(new ToolingDeploymentFormatter(testClass.getJavaClass()));
      writeOutToFile(
            new File(deploymentOutputFolder + "/" + testClass.getName() + ".xml"),
            deploymentContent);
   }
View Full Code Here

Examples of org.jboss.arquillian.test.spi.TestClass

     *
     * @param event
     */
    public void verifyThatRunAsClientClassIsNotTestable(@Observes BeforeClass event) {

        TestClass testClass = event.getTestClass();

        // run-as-client class
        if (testClass.getAnnotation(RunAsClient.class) != null) {

            // non-warp class
            if (testClass.getAnnotation(WarpTest.class) == null) {
                Method method = testClass.getMethod(Deployment.class);
                Deployment deployment = method.getAnnotation(Deployment.class);

                // deployment is testable
                if (deployment.testable()) {
                    throw new IllegalArgumentException("Non-Warp test that is marked as @RunAsClient should not be testable: "
                            + testClass.getJavaClass().getName());
                }
            }
        }
    }
View Full Code Here

Examples of org.jboss.arquillian.test.spi.TestClass

    @Before
    public void setUp() {

        test = new StrategyTest();

        testClass = new TestClass(StrategyTest.class);

        ClassPathXmlApplicationContext applicationContext =
                new ClassPathXmlApplicationContext("testApplicationContext.xml");

        TestScopeApplicationContext testScopeApplicationContext =
View Full Code Here

Examples of org.jboss.arquillian.test.spi.TestClass

     * <p>Sets up the test environment.</p>
     */
    @Before
    public void setUp() {

        testClass = new TestClass(Object.class);

        instance = new DefaultApplicationContextDestroyer();
    }
View Full Code Here

Examples of org.jboss.arquillian.test.spi.TestClass

     * <p>Sets up the test environment.</p>
     */
    @Before
    public void setUp() {

        testClass = new TestClass(Object.class);

        applicationContext = mock(ApplicationContext.class);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.