Examples of TestDescription


Examples of org.assertj.core.internal.TestDescription

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

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

Examples of org.assertj.core.internal.TestDescription

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

  @Test
  public void should_create_error_message() {
    String message = factory.create(new TestDescription("Test"), new StandardRepresentation());
    assertEquals(
        "[Test] \ngroup is not sorted 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

Examples of org.assertj.core.internal.TestDescription

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

  @Test
  public void should_create_error_message() {
    String message = factory.create(new TestDescription("Test"), new StandardRepresentation());
    assertThat(message).isEqualTo("[Test] \n" +
                                  "Expecting:\n" +
                                  "  <8.0f>\n" +
                                  "to be close to:\n" +
                                  "  <6.0f>\n" +
View Full Code Here

Examples of org.assertj.core.internal.TestDescription

    factory = shouldNotBeInstance("Yoda", String.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 an instance of:<java.lang.String>", message);
  }
View Full Code Here

Examples of org.assertj.core.internal.TestDescription

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

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

Examples of org.assertj.core.internal.TestDescription

  private ShouldBeEqual factory;
  private DescriptionFormatter formatter;

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

Examples of org.assertj.core.internal.TestDescription

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

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

Examples of org.assertj.core.internal.TestDescription

    factory = shouldBeInstanceOfAny("Yoda", types);
  }

  @Test
  public void should_create_error_message() {
    String message = factory.create(new TestDescription("Test"), new StandardRepresentation());
    assertEquals(
        "[Test] \nExpecting:\n <\"Yoda\">\nto be an instance of any of:\n <[java.io.File, java.util.regex.Pattern]>\nbut was instance of:\n <java.lang.String>",
        message);
  }
View Full Code Here

Examples of org.assertj.core.internal.TestDescription

                                                                   new CaseInsensitiveStringComparator());
  }

  @Test
  public void should_create_error_message() {
  String message = factory.create(new TestDescription("Test"), new StandardRepresentation());
  assertThat(message).isEqualTo("[Test] \nsome elements are not mutually comparable according to 'CaseInsensitiveStringComparator' comparator in group:\n"
                                    + "<[\"b\", \"c\", \"a\"]>");

  }
View Full Code Here

Examples of org.assertj.core.internal.TestDescription

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

  @Test
  public void should_create_error_message() {
    String message = factory.create(new TestDescription("Test"), new StandardRepresentation());
    assertEquals(
        "[Test] \nExpecting:\n <\"Yoda\">\nto be an instance of:\n <java.io.File>\nbut was instance of:\n <java.lang.String>",
        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.