Package org.springframework.test

Examples of org.springframework.test.AssertThrows


        "just return the default scope (PageContext.PAGE_SCOPE).",
        TagUtils.getScope("bla"), PageContext.PAGE_SCOPE);
  }

  public void testGetScopeWithNullScopeArgument() {
    new AssertThrows(IllegalArgumentException.class) {
      public void test() throws Exception {
        TagUtils.getScope(null);
      }
    }.runTest();
  }
View Full Code Here


      }
    }.runTest();
  }

  public void testHasAncestorOfTypeWhereAncestorTagIsNotATagType() throws Exception {
    new AssertThrows(IllegalArgumentException.class) {
      public void test() throws Exception {
        assertFalse(TagUtils.hasAncestorOfType(
            new TagSupport(), String.class));
      }
    }.runTest();
View Full Code Here

      }
    }.runTest();
  }

  public void testHasAncestorOfTypeWithNullTagArgument() throws Exception {
    new AssertThrows(IllegalArgumentException.class) {
      public void test() throws Exception {
        assertFalse(TagUtils.hasAncestorOfType(null, TagSupport.class));
      }
    }.runTest();
  }
View Full Code Here

      }
    }.runTest();
  }

  public void testHasAncestorOfTypeWithNullAncestorTagClassArgument() throws Exception {
    new AssertThrows(IllegalArgumentException.class) {
      public void test() throws Exception {
        assertFalse(TagUtils.hasAncestorOfType(new TagSupport(), null));
      }
    }.runTest();
  }
View Full Code Here

  public void testHasAncestorOfTypeWhenTagHasNoParent() throws Exception {
    assertFalse(TagUtils.hasAncestorOfType(new TagA(), TagC.class));
  }

  public void testAssertHasAncestorOfTypeWithNullTagName() throws Exception {
    new AssertThrows(IllegalArgumentException.class) {
      public void test() throws Exception {
        TagUtils.assertHasAncestorOfType(new TagA(), TagC.class, null, "c");
      }
    }.runTest();
  }
View Full Code Here

      }
    }.runTest();
  }

  public void testAssertHasAncestorOfTypeWithNullAncestorTagName() throws Exception {
    new AssertThrows(IllegalArgumentException.class) {
      public void test() throws Exception {
        TagUtils.assertHasAncestorOfType(new TagA(), TagC.class, "a", null);
      }
    }.runTest();
  }
View Full Code Here

      }
    }.runTest();
  }

  public void testAssertHasAncestorOfTypeThrowsExceptionOnFail() throws Exception {
    new AssertThrows(IllegalStateException.class) {
      public void test() throws Exception {
        Tag a = new TagA();
        Tag b = new TagB();
        Tag anotherB = new TagB();
View Full Code Here

  private static final Serializable VALUE = new Serializable() {
  };


  public void testCtorRejectsNullArg() throws Exception {
    new AssertThrows(IllegalArgumentException.class) {
      public void test() throws Exception {
        new ServletRequestAttributes(null);
      }
    }.runTest();
  }
View Full Code Here

  private static final Serializable VALUE = new Serializable() {
  };


  public void testCtorRejectsNullArg() throws Exception {
    new AssertThrows(IllegalArgumentException.class) {
      public void test() throws Exception {
        new PortletRequestAttributes(null);
      }
    }.runTest();
  }
View Full Code Here

        sessionControl.verify();
        messageControl.verify();
    }

    public void testToMessageThrowsExceptionIfGivenNullObjectToConvert() throws Exception {
        new AssertThrows(MessageConversionException.class) {
            public void test() throws Exception {
                new SimpleMessageConverter().toMessage(null, null);
            }
        }.runTest();
    }
View Full Code Here

TOP

Related Classes of org.springframework.test.AssertThrows

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.