Examples of TestDescription


Examples of com.google.guiceberry.TestDescription

    };
  }

  static TestDescription buildTestDescription(TestCase testCase, String methodName) {
    String testCaseName = testCase.getClass().getName();
    return new TestDescription(testCase, testCaseName + "." + methodName);
  }
View Full Code Here

Examples of org.assertj.core.internal.TestDescription

    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

Examples of org.assertj.core.internal.TestDescription

    factory = shouldNotBeNull();
  }

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

Examples of org.assertj.core.internal.TestDescription

  private ShouldBeEqual factory;
  private ConstructorInvoker constructorInvoker;

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

Examples of org.assertj.core.internal.TestDescription

    factory = shouldHaveSameClass("Yoda", 10L);
  }

  @Test
  public void should_create_error_message() {
    String message = factory.create(new TestDescription("Test"), new StandardRepresentation());
    assertEquals(
        "[Test] \nExpecting\n <\"Yoda\">\nto have the same class as:\n <10L>(<java.lang.Long>) \nbut its class was:<java.lang.String>", message);
  }
View Full Code Here

Examples of org.assertj.core.internal.TestDescription

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

  @Test
  public void should_create_error_message() {
    String message = factory.create(new TestDescription("Test"), new StandardRepresentation());
    assertEquals("[Test] \nExpecting:\n <\"Yoda\">\nnot to have not the same class as:\n <\"Luke\"> (java.lang.String)", message);
  }
View Full Code Here

Examples of org.assertj.core.internal.TestDescription

  private final Description description;

  @Parameters
  public static List<Object[]> parameters() {
    return newArrayList(new Object[][] { { null }, { new TestDescription(null) }, { new TestDescription("") } });
  }
View Full Code Here

Examples of org.assertj.core.internal.TestDescription

                                                            "  <\"" + expectedExtension + "\">%n" +
                                                            "but had no extension."));
  }

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

Examples of org.assertj.core.internal.TestDescription

    factory = shouldNotBeSame("Yoda");
  }

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

Examples of org.assertj.core.internal.TestDescription

    factory.formatter = formatter;
  }

  @Test
  public void should_implement_toString() {
    Description description = new TestDescription("Test");
    Representation representation = new StandardRepresentation();
    String formattedMessage = "[Test] Hello Yoda";
    when(formatter.format(description, representation, "Hello %s", "Yoda")).thenReturn(formattedMessage);
    assertEquals(formattedMessage, factory.create(description, representation));
  }
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.