Examples of TestDescription


Examples of org.assertj.core.internal.TestDescription

  }

  @Test
  public void should_create_shouldBeInstanceButWasNull_error_message() {
    factory = shouldBeInstanceButWasNull("other", File.class);
    String message = factory.create(new TestDescription("Test"), new StandardRepresentation());
    assertEquals("[Test] \nExpecting object:\n \"other\"\nto be an instance of:\n <java.io.File>\nbut was null", message);
  }
View Full Code Here

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

Examples of org.assertj.core.internal.TestDescription

    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

Examples of org.assertj.core.internal.TestDescription

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

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

Examples of org.assertj.core.internal.TestDescription

  private Description description;
  private ShouldBeEqual shouldBeEqual;

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

Examples of org.assertj.core.internal.TestDescription

    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

Examples of org.assertj.core.internal.TestDescription

    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

Examples of org.assertj.core.internal.TestDescription

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

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

Examples of org.assertj.core.internal.TestDescription

    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

Examples of org.assertj.core.internal.TestDescription

  @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
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.