Package org.assertj.core.internal

Examples of org.assertj.core.internal.TestDescription


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

  @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 any of these types:\n <[java.lang.String, java.lang.Object]>", message);
  }
View Full Code Here


    assertEquals("my message", failure.getMessage());
  }

  @Test
  public void should_use_ErrorMessage_when_overriding_error_message_is_not_specified() {
    Description description = new TestDescription("description");
    info.description(description);
    when(errorMessage.create(description, info.representation())).thenReturn("[description] my message");
    AssertionError failure = failures.failure(info, errorMessage);
    assertEquals("[description] my message", failure.getMessage());
  }
View Full Code Here

  }

  @Test
  public void should_use_AssertionErrorFactory_when_overriding_error_message_is_not_specified() {
    MyOwnAssertionError expectedError = new MyOwnAssertionError("[description] my message");
    Description description = new TestDescription("description");
    info.description(description);
    when(errorFactory.newAssertionError(description, info.representation())).thenReturn(expectedError);
    AssertionError failure = failures.failure(info, errorFactory);
    assertSame(expectedError, failure);
  }
View Full Code Here

  private static Description description;

  @BeforeClass
  public static void setUpOnce() {
    description = new TestDescription(someTextDescription());
  }
View Full Code Here

  private static Description description;

  @BeforeClass
  public static void setUpOnce() {
    description = new TestDescription(someTextDescription());
  }
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.