Package org.fest.assertions.error

Examples of org.fest.assertions.error.MessageFormatter.format()


  public void should_fail_if_actual_is_not_NaN() {
    try {
      floats.assertIsNaN(description, 8f);
    } catch (org.junit.ComparisonFailure e) {
      MessageFormatter messageFormatter = MessageFormatter.instance();
      String message = messageFormatter.format(description, "expected:<%s> but was:<%s>", Float.NaN, 8f);
      e.getMessage().equalsIgnoreCase(message);
      return;
    }
    expectedAssertionErrorNotThrown();
  }
View Full Code Here


  }

  @Test
  public void should_fail_if_actual_is_not_equal_to_expectd() {
    MessageFormatter messageFormatter = MessageFormatter.instance();
    String message = messageFormatter.format(description, "expected:<%s> but was:<%s>", BigDecimal.TEN, BigDecimal.ONE);
    try {
      bigDecimals.assertEqual(description, BigDecimal.ONE, BigDecimal.TEN);
    } catch (org.junit.ComparisonFailure e) {
      e.getMessage().equalsIgnoreCase(message);
    }
View Full Code Here

  @Test
  public void should_fail_if_actual_is_not_NaN() {
    Double actual = new Double(6.0);
    MessageFormatter messageFormatter = MessageFormatter.instance();
    String message = messageFormatter.format(description, "expected:<%s> but was:<%s>", Double.NaN, actual);
    try {
      doubles.assertIsNaN(description, new Double(6.0));
    } catch (org.junit.ComparisonFailure e) {
      e.getMessage().equalsIgnoreCase(message);
      return;
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.