Examples of EasyMockTemplate


Examples of org.fest.mocks.EasyMockTemplate

  @Test
  public void should_write_error_type_and_message_as_attributes() {
    final String errorMsg = "Thrown on purpose";
    final Exception e = new Exception(errorMsg);
    new EasyMockTemplate(targetNode) {
      @Override protected void expectations() {
        targetNode.addAttribute(name(ATTR_MESSAGE).value(errorMsg));
        expectLastCall().once();
        targetNode.addAttribute(name(ATTR_TYPE).value(Exception.class.getName()));
        expectLastCall().once();
View Full Code Here

Examples of org.fest.mocks.EasyMockTemplate

  }

  @Test
  public void should_write_only_error_type_as_attribute_when_error_message_is_empty() {
    final Exception e = new Exception("");
    new EasyMockTemplate(targetNode) {
      @Override protected void expectations() {
        targetNode.addAttribute(name(ATTR_TYPE).value(Exception.class.getName()));
        expectLastCall().once();
      }
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.