Repository: jspwiki Updated Branches: refs/heads/master b72785ca8 -> 1655436f6
add missing FilterBeanTest Project: http://git-wip-us.apache.org/repos/asf/jspwiki/repo Commit: http://git-wip-us.apache.org/repos/asf/jspwiki/commit/1655436f Tree: http://git-wip-us.apache.org/repos/asf/jspwiki/tree/1655436f Diff: http://git-wip-us.apache.org/repos/asf/jspwiki/diff/1655436f Branch: refs/heads/master Commit: 1655436f619599b82506217350e0443bff4afced Parents: b72785c Author: juanpablo <juanpa...@apache.org> Authored: Tue Aug 22 20:47:25 2017 +0200 Committer: juanpablo <juanpa...@apache.org> Committed: Tue Aug 22 20:47:25 2017 +0200 ---------------------------------------------------------------------- .../wiki/ui/admin/beans/FilterBeanTest.java | 53 ++++++++++++++++++++ 1 file changed, 53 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/jspwiki/blob/1655436f/jspwiki-war/src/test/java/org/apache/wiki/ui/admin/beans/FilterBeanTest.java ---------------------------------------------------------------------- diff --git a/jspwiki-war/src/test/java/org/apache/wiki/ui/admin/beans/FilterBeanTest.java b/jspwiki-war/src/test/java/org/apache/wiki/ui/admin/beans/FilterBeanTest.java new file mode 100755 index 0000000..2e2dace --- /dev/null +++ b/jspwiki-war/src/test/java/org/apache/wiki/ui/admin/beans/FilterBeanTest.java @@ -0,0 +1,53 @@ +/* + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, + software distributed under the License is distributed on an + "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + KIND, either express or implied. See the License for the + specific language governing permissions and limitations + under the License. + */ +package org.apache.wiki.ui.admin.beans; + +import java.util.Properties; + +import javax.management.NotCompliantMBeanException; + +import org.apache.wiki.TestEngine; +import org.apache.wiki.WikiContext; +import org.apache.wiki.WikiPage; +import org.apache.wiki.api.exceptions.WikiException; + +import junit.framework.TestCase; + + +public class FilterBeanTest extends TestCase { + + Properties props = TestEngine.getTestProperties(); + + TestEngine testEngine; + + public void testDoGet() throws WikiException, NotCompliantMBeanException { + testEngine = new TestEngine( props ); + WikiContext context = new WikiContext( testEngine, new WikiPage( testEngine, "TestPage01" ) ); + FilterBean pb = new FilterBean( testEngine ); + String expectedHtml = "<div>" + + "<h4>Filters</h4>" + + "<table border=\"1\">" + + "<tr><th>Name</th><th>Author</th><th>Notes</th></tr>" + + "<tr><td>org.apache.wiki.filters.SpamFilter</td><td>Janne Jalkanen</td><td></td></tr>" + + "</table>" + + "</div>"; + assertEquals( expectedHtml, pb.doGet( context ) ); + } + +}