Package org.jmock

Examples of org.jmock.Mock.verify()


    mockRenderKit.verify();
    mockRenderer.verify();
    mockConverter.verify();
    mockValidator.verify();
    mockListener.verify();

    setCurrentContext(null);
  }

View Full Code Here


      root.getChildren().add(component);
    component.getChildren().add(child);
       
    root.processValidators(context);

    mock.verify();
  }

  /**
   * Tests the update-model-values lifecycle phase.
   */
 
View Full Code Here

    doTestUpdateModelValues(facesContext, root, component);

    setCurrentContext(null);

    mockRenderer.verify();
    mockBinding.verify();
  }


  @SuppressWarnings("unchecked")
  protected void doTestUpdateModelValues(
View Full Code Here

    Date dt = (Date) dtConv.getAsObject(facesContext, component, inputValue);
    assertEquals(true, isEqual(date, dt));

    String exptectedStr = dtConv.getAsString(facesContext, component, dt);
    assertEquals(inputValue, exptectedStr);
    mock.verify();
  }

  public void testShortishDateStyle()
  {
    doTestStyleValidity(_DATE_STYLE, new String[]{"shortish"});
View Full Code Here

    // now we set date and type so this is expected to work fine.

    String expectedOut = dtConv.getAsString(facesContext, component, date);
    assertEquals(inputValue, expectedOut);

    mock.verify();
  }

  public void testLeniencyOnPrimaryPattern()
  {
    String primaryPattern = "MMM/d/yyyy";
View Full Code Here

      dtConv.setType("INVALID"); // make this type invalid

      Date convDate = (Date) dtConv.getAsObject(facesContext, component,
                                                validInputs[i]);
      assertEquals(convDate, dt);
      mock.verify();
    }
  }

  public void testCompareDateTimeConverter()
  {
View Full Code Here

    }
    finally
    {
      setFacesContext(null);
    }
    mock.verify();
  }

  public void testAppropriateFormatsArePicked()
  {
    // check if appropriate formtas based on the types are chosen.
View Full Code Here

      }
      finally
      {
        setFacesContext(null);
      }
      mock.verify();
    }
  }

  public void testStateHolderSaveRestore()
  {
View Full Code Here

    }
    finally
    {
      setFacesContext(null);
    }
    mock.verify();
  }

  public void testCurrencyCodeIsHonouredWhenCurrencyCodeAndCurrencySymbolIsSet()
  {
    NumberConverter converter   = getNumberConverter();
View Full Code Here

    }
    finally
    {
      setFacesContext(null);
    }
    mock.verify();
  }

  public void testCurrencySymbolIsHonoured()
  {
    NumberConverter converter = getNumberConverter();
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.