Package org.jmock

Examples of org.jmock.Mock.verify()


    }
    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

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

  public void testIntegerOnlyIsHonoured()
  {
    // integerOnly is used only while parsing to create number objects
View Full Code Here

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


  public void testSettingFractDigitsAndSettingMinDigitsDoesNotAffectParsing()
  {
View Full Code Here

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

  public void testLocaleIsPickedUpFromViewRoot()
  {
View Full Code Here

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

  public void testStrictnessOfConversion()
  {
    String[] inputValues = {"123ABC", "22.22.2" };
View Full Code Here

    for (int i = 0; i < inputValues.length; i++)
    {
      doTestStrictNess(facesContext, wrapper, Locale.US, inputValues[i]);
    }
    mock.verify();
  }

  public void testSettingFractDigitsAndSettingMinDigitsAreHononured()
  {
    Number[] inputValues = {new Long(1234), new Double(1234.5678), new Double(1234), new Double(10.00)};
View Full Code Here

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

  protected abstract NumberConverter getNumberConverter();

  protected abstract void doTestStrictNess(
View Full Code Here

    conv.setLocale(Locale.US);
    Number inputValue =  new Double(8989.789);
    String out = conv.getAsString(facesContext, component, inputValue);
    assertEquals("8!989*789", out);

    mock.verify();
  }

  @Override
  protected void doTestStrictNess(
    MockFacesContext context,
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

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.