Package org.fest.assertions.internal

Examples of org.fest.assertions.internal.TestDescription


    factory = shouldNotBeEqual("Yoda", "Luke");
  }

  @Test
  public void should_create_error_message() {
    String message = factory.create(new TestDescription("Jedi"));
    assertEquals("[Jedi] expecting:\n<'Yoda'> should not be equal to:<'Luke'>", message);
  }
View Full Code Here


  private final String formattedDescription = "[Jedi]";
  private Description description;

  @Before
  public void setUp() {
    description = new TestDescription("Jedi");
  }
View Full Code Here

    formatter = DescriptionFormatter.instance();
  }

  @Test
  public void should_format_description_if_value_is_not_empty_or_null() {
    assertEquals("[Leia] ", formatter.format(new TestDescription("Leia")));
  }
View Full Code Here

    factory = shouldBeSorted(1, array("b", "c", "a"));
  }

  @Test
  public void should_create_error_message() {
    String message = factory.create(new TestDescription("Test"));
    assertEquals("[Test] group is not sorted because element 1:<'c'> is not less or equal than element 2:<'a'>.\n"
        + "group was:\n" + "<['b', 'c', 'a']>", message);
  }
View Full Code Here

    factory = shouldBeEqual(8f, 6f, offset(1f), 2f);
  }

  @Test
  public void should_create_error_message() {
    String message = factory.create(new TestDescription("Test"));
    assertEquals("[Test] expecting:\n <8.0f> to be close to <6.0f> within offset <1.0f> but offset was <2.0f>", message);
  }
View Full Code Here

    factory = shouldBeExactlyInstance("Yoda", File.class);
  }

  @Test
  public void should_create_error_message() {
    String message = factory.create(new TestDescription("Test"));
    assertEquals(
        "[Test] expecting:\n<'Yoda'> to have exactly the same type as:<java.io.File> but was:<java.lang.String>",
        message);
  }
View Full Code Here

    factory = shouldBeEmpty(newArrayList("Luke", "Yoda"));
  }

  @Test
  public void should_create_error_message() {
    String message = factory.create(new TestDescription("Test"));
    assertEquals("[Test] expecting:\n empty but was:<['Luke', 'Yoda']>", message);
  }
View Full Code Here

  @Rule
  public ExpectedException thrown = none();

  @Test
  public void should_set_description() {
    Description description = new TestDescription("testing");
    Matcher<Object> matcher = new Matcher<Object>(description) {
      @Override
      public boolean matches(Object value) {
        return false;
      }
View Full Code Here

  private ConstructorInvoker constructorInvoker;
  private NotEqualErrorFactory factory;

  @Before
  public void setUp() {
    description = new TestDescription("Jedi");
    constructorInvoker = mock(ConstructorInvoker.class);
    factory = shouldBeEqual("Luke", "Yoda");
    factory.constructorInvoker = constructorInvoker;
  }
View Full Code Here

  private Description description;
  private NotEqualErrorFactory shouldBeEqual;

  @Before
  public void setUp() {
    description = new TestDescription("my test");
  }
View Full Code Here

TOP

Related Classes of org.fest.assertions.internal.TestDescription

Copyright © 2018 www.massapicom. 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.