Examples of TestRunner


Examples of org.apache.myfaces.TestRunner

        assertSetValueExpressionException(NullPointerException.class, null);
    }

    private void assertSetValueExpressionException(Class<? extends Throwable> expected, final String name)
    {
        Assert.assertException(expected, new TestRunner()
        {
            public void run() throws Throwable
            {
                _testImpl.setValueExpression(name, null);
            }
View Full Code Here

Examples of org.apache.myfaces.TestRunner

        mockedMethods.add(clazz.getDeclaredMethod("getClientId", new Class[] { FacesContext.class }));
        final UIComponent testimpl = _mocksControl.createMock(clazz, mockedMethods.toArray(new Method[mockedMethods
                .size()]));
        _mocksControl.checkOrder(true);

        assertException(NullPointerException.class, new TestRunner()
        {
            public void run() throws Throwable
            {
                testimpl.getContainerClientId(null);
            }
View Full Code Here

Examples of org.apache.myfaces.TestRunner

     * Test method for
     * {@link javax.faces.component._MethodBindingToMethodExpression#_MethodBindingToMethodExpression(javax.faces.el.MethodBinding)}.
     */
    public void test_MethodBindingToMethodExpressionMethodBinding()
    {
        Assert.assertException(IllegalArgumentException.class, new TestRunner()
        {
            public void run() throws Throwable
            {
                new _MethodBindingToMethodExpression(null);
            }
View Full Code Here

Examples of org.apache.myfaces.TestRunner

    private void assertGetMethodInfoException(Class<? extends Throwable> expected, final Throwable firedFromMBGetType)
    {
        final _MethodBindingToMethodExpression testimpl = new _MethodBindingToMethodExpression(_methodBinding);
        expect(_methodBinding.getType(same(_facesContext))).andThrow(firedFromMBGetType);
        _mocksControl.replay();
        Assert.assertException(expected, new TestRunner()
        {
            public void run() throws Throwable
            {
                testimpl.getMethodInfo(_elContext);
            }
View Full Code Here

Examples of org.apache.myfaces.TestRunner

    private void assertInvokeException(Class<? extends Throwable> expected, final Throwable firedFromMBInvoke)
    {
        final _MethodBindingToMethodExpression testimpl = new _MethodBindingToMethodExpression(_methodBinding);
        expect(_methodBinding.invoke(same(_facesContext), (Object[]) isNull())).andThrow(firedFromMBInvoke);
        _mocksControl.replay();
        Assert.assertException(expected, new TestRunner()
        {
            public void run() throws Throwable
            {
                testimpl.invoke(_elContext, null);
            }
View Full Code Here

Examples of org.apache.myfaces.TestRunner

     * Test method for
     * {@link org.apache.myfaces.application.jsp.JspViewHandlerImpl#calculateLocale(javax.faces.context.FacesContext)}.
     */
    public void testCalculateLocaleNPE()
    {
        assertException(NullPointerException.class, new TestRunner()
        {
            public void run() throws Throwable
            {
                _testimpl.calculateLocale(null);
            }
View Full Code Here

Examples of org.apache.myfaces.TestRunner

        expect(_externalContext.getRequestMap()).andReturn(emptyMap);
        expect(_externalContext.getRequestPathInfo()).andReturn(null);
        expect(_externalContext.getRequestServletPath()).andReturn(null);

        _mocksControl.replay();
        Assert.assertException(FacesException.class, new TestRunner()
        {
            public void run() throws Throwable
            {
                _testimpl.calculateViewId(_facesContext);
            }
View Full Code Here

Examples of org.apache.myfaces.TestRunner

        _facesContext.setProcessingEvents(eq(true));
        expect(_viewHandler.restoreView(same(_facesContext), eq("calculatedViewId"))).andReturn(null);
        _facesContext.setProcessingEvents(eq(false));

        _mocksControl.replay();
        assertException(ViewExpiredException.class, new TestRunner()
        {
            public void run() throws Throwable
            {
                _testimpl.doPrePhaseActions(_facesContext);
                _testimpl.execute(_facesContext);
View Full Code Here

Examples of org.ethereum.jsontestsuite.TestRunner

        while (testIterator.hasNext()){

            TestCase testCase = testIterator.next();
           
            TestRunner runner = new TestRunner();
            List<String> result = runner.runTestCase(testCase);
            Assert.assertTrue(result.isEmpty());
        }
    }
View Full Code Here

Examples of org.jboss.arquillian.container.test.spi.TestRunner

   {
      currentCall.set(className + methodName);
      TestResult result = new TestResult();
      try
      {
         TestRunner runner = mockTestRunner;
         if (runner == null)
         {
            runner = TestRunners.getTestRunner(getClass().getClassLoader());
         }

         log.fine("Load test class: " + className);
         Class<?> testClass = testClassLoader.loadTestClass(className);
         log.fine("Test class loaded from: " + testClass.getClassLoader());

         log.fine("Execute: " + className + "." + methodName);
         result = runner.execute(testClass, methodName);
      }
      catch (Throwable th)
      {
         result.setStatus(Status.FAILED);
         result.setEnd(System.currentTimeMillis());
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.