Package org.assertj.core.internal

Examples of org.assertj.core.internal.TestDescription


  @Before public void setup() {
    factory = ShouldBeExecutable.shouldBeExecutable(new FakeFile("pathname"));
  }

  @Test public void createExpectedMessage() {
    String actualMessage = factory.create(new TestDescription("Test"), new StandardRepresentation());
    assertEquals("[Test] \nExpecting:\n <pathname>\nto be executable", actualMessage);
  }
View Full Code Here


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

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

                                                        "but had:%n" +
                                                        "  <\"actual-file\">."));
  }

  private String createMessage() {
    return shouldHaveName(actual, expectedName).create(new TestDescription("TEST"), new StandardRepresentation());
  }
View Full Code Here

  private Description description;
  private ShouldBeEqual shouldBeEqual;

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

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

  @Test
  public void should_create_error_message() {
    String message = factory.create(new TestDescription("Test"), new StandardRepresentation());
    assertEquals("[Test] \nExpecting\n <\"Yoda\">\nnot to be of exact type:\n <java.io.File>\nbut was:<java.lang.String>",
        message);
  }
View Full Code Here

    factory = shouldNotBeEmpty();
  }

  @Test
  public void should_create_error_message() {
    String message = factory.create(new TestDescription("Test"), new StandardRepresentation());
    assertEquals("[Test] \nExpecting actual not to be empty", message);
  }
View Full Code Here

                                                        "but had:%n" +
                                                        "  <" + actual.getParentFile() + ">."));
  }

  private String createMessage() {
    return shouldHaveParent(actual, expectedParent).create(new TestDescription("TEST"), new StandardRepresentation());
  }
View Full Code Here

    factory = shouldExist(new FakeFile("xyz"));
  }

  @Test
  public void should_create_error_message() {
    String message = factory.create(new TestDescription("Test"), new StandardRepresentation());
    assertEquals("[Test] \nExpecting file:<xyz> to exist", message);
  }
View Full Code Here

  @Test
  public void should_create_error_message_with_comparator() {
    ErrorMessageFactory factory = shouldBeSortedAccordingToGivenComparator(1, array("b", "c", "A"),
        new CaseInsensitiveStringComparator());
    String message = factory.create(new TestDescription("Test"), new StandardRepresentation());
    assertEquals(
        "[Test] \ngroup is not sorted according to 'CaseInsensitiveStringComparator' comparator because element 1:\n <\"c\">\nis not less or equal than element 2:\n <\"A\">\ngroup was:\n <[\"b\", \"c\", \"A\"]>",
        message);
  }
View Full Code Here

  @Test
  public void should_create_error_message_with_private_static_comparator() {
    ErrorMessageFactory factory = shouldBeSortedAccordingToGivenComparator(1, array("b", "c", "a"),
        new StaticStringComparator());
    String message = factory.create(new TestDescription("Test"), new StandardRepresentation());
    assertEquals(
        "[Test] \ngroup is not sorted according to 'StaticStringComparator' comparator because element 1:\n <\"c\">\nis not less or equal than element 2:\n <\"a\">\ngroup was:\n <[\"b\", \"c\", \"a\"]>",
        message);
  }
View Full Code Here

TOP

Related Classes of org.assertj.core.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.