Java Code Examples for javax.servlet.jsp.tagext.Tag#setParent()
The following examples show how to use
javax.servlet.jsp.tagext.Tag#setParent() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TagUtilsTests.java From spring-analysis-note with MIT License | 5 votes |
@Test public void hasAncestorOfTypeTrueScenario() throws Exception { Tag a = new TagA(); Tag b = new TagB(); Tag c = new TagC(); a.setParent(b); b.setParent(c); assertTrue(TagUtils.hasAncestorOfType(a, TagC.class)); }
Example 2
Source File: TagUtilsTests.java From spring-analysis-note with MIT License | 5 votes |
@Test public void hasAncestorOfTypeFalseScenario() throws Exception { Tag a = new TagA(); Tag b = new TagB(); Tag anotherB = new TagB(); a.setParent(b); b.setParent(anotherB); assertFalse(TagUtils.hasAncestorOfType(a, TagC.class)); }
Example 3
Source File: TagUtilsTests.java From spring-analysis-note with MIT License | 5 votes |
@Test(expected = IllegalStateException.class) public void assertHasAncestorOfTypeThrowsExceptionOnFail() throws Exception { Tag a = new TagA(); Tag b = new TagB(); Tag anotherB = new TagB(); a.setParent(b); b.setParent(anotherB); TagUtils.assertHasAncestorOfType(a, TagC.class, "a", "c"); }
Example 4
Source File: TagUtilsTests.java From spring-analysis-note with MIT License | 5 votes |
@Test public void testAssertHasAncestorOfTypeDoesNotThrowExceptionOnPass() throws Exception { Tag a = new TagA(); Tag b = new TagB(); Tag c = new TagC(); a.setParent(b); b.setParent(c); TagUtils.assertHasAncestorOfType(a, TagC.class, "a", "c"); }
Example 5
Source File: TagUtilsTests.java From java-technology-stack with MIT License | 5 votes |
@Test public void hasAncestorOfTypeTrueScenario() throws Exception { Tag a = new TagA(); Tag b = new TagB(); Tag c = new TagC(); a.setParent(b); b.setParent(c); assertTrue(TagUtils.hasAncestorOfType(a, TagC.class)); }
Example 6
Source File: TagUtilsTests.java From java-technology-stack with MIT License | 5 votes |
@Test public void hasAncestorOfTypeFalseScenario() throws Exception { Tag a = new TagA(); Tag b = new TagB(); Tag anotherB = new TagB(); a.setParent(b); b.setParent(anotherB); assertFalse(TagUtils.hasAncestorOfType(a, TagC.class)); }
Example 7
Source File: TagUtilsTests.java From java-technology-stack with MIT License | 5 votes |
@Test(expected = IllegalStateException.class) public void assertHasAncestorOfTypeThrowsExceptionOnFail() throws Exception { Tag a = new TagA(); Tag b = new TagB(); Tag anotherB = new TagB(); a.setParent(b); b.setParent(anotherB); TagUtils.assertHasAncestorOfType(a, TagC.class, "a", "c"); }
Example 8
Source File: TagUtilsTests.java From java-technology-stack with MIT License | 5 votes |
@Test public void testAssertHasAncestorOfTypeDoesNotThrowExceptionOnPass() throws Exception { Tag a = new TagA(); Tag b = new TagB(); Tag c = new TagC(); a.setParent(b); b.setParent(c); TagUtils.assertHasAncestorOfType(a, TagC.class, "a", "c"); }
Example 9
Source File: TagUtilsTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Test public void hasAncestorOfTypeTrueScenario() throws Exception { Tag a = new TagA(); Tag b = new TagB(); Tag c = new TagC(); a.setParent(b); b.setParent(c); assertTrue(TagUtils.hasAncestorOfType(a, TagC.class)); }
Example 10
Source File: TagUtilsTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Test public void hasAncestorOfTypeFalseScenario() throws Exception { Tag a = new TagA(); Tag b = new TagB(); Tag anotherB = new TagB(); a.setParent(b); b.setParent(anotherB); assertFalse(TagUtils.hasAncestorOfType(a, TagC.class)); }
Example 11
Source File: TagUtilsTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Test(expected = IllegalStateException.class) public void assertHasAncestorOfTypeThrowsExceptionOnFail() throws Exception { Tag a = new TagA(); Tag b = new TagB(); Tag anotherB = new TagB(); a.setParent(b); b.setParent(anotherB); TagUtils.assertHasAncestorOfType(a, TagC.class, "a", "c"); }
Example 12
Source File: TagUtilsTests.java From spring4-understanding with Apache License 2.0 | 5 votes |
@Test public void testAssertHasAncestorOfTypeDoesNotThrowExceptionOnPass() throws Exception { Tag a = new TagA(); Tag b = new TagB(); Tag c = new TagC(); a.setParent(b); b.setParent(c); TagUtils.assertHasAncestorOfType(a, TagC.class, "a", "c"); }