blob: 295ea2f8d9b1b6d1dffb4093aeb9afcdec1e7953 [file] [log] [blame]
<?xml version="1.0"?>
<!--
Copyright 2002,2004 The Apache Software Foundation.
Licensed 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.
-->
<test:suite xmlns:test="jelly:junit" xmlns:j="jelly:core" xmlns:log="jelly:log">
<test:case name="debugTest">
<j:useBean var="logger" class="org.apache.commons.jelly.tags.log.MockLog"/>
<log:debug log="${logger}">abcde</log:debug>
<test:assertEquals expected="abcde" actual="${logger.debug}" />
</test:case>
<test:case name="traceTest">
<j:useBean var="logger" class="org.apache.commons.jelly.tags.log.MockLog"/>
<log:trace log="${logger}">abcde</log:trace>
<test:assertEquals expected="abcde" actual="${logger.trace}" />
</test:case>
<test:case name="infoTest">
<j:useBean var="logger" class="org.apache.commons.jelly.tags.log.MockLog"/>
<log:info log="${logger}">abcde</log:info>
<test:assertEquals expected="abcde" actual="${logger.info}" />
</test:case>
<test:case name="warnTest">
<j:useBean var="logger" class="org.apache.commons.jelly.tags.log.MockLog"/>
<log:warn log="${logger}">abcde</log:warn>
<test:assertEquals expected="abcde" actual="${logger.warn}" />
</test:case>
<test:case name="errorTest">
<j:useBean var="logger" class="org.apache.commons.jelly.tags.log.MockLog"/>
<log:error log="${logger}">abcde</log:error>
<test:assertEquals expected="abcde" actual="${logger.error}" />
</test:case>
<test:case name="fatalTest">
<j:useBean var="logger" class="org.apache.commons.jelly.tags.log.MockLog"/>
<log:fatal log="${logger}">abcde</log:fatal>
<test:assertEquals expected="abcde" actual="${logger.fatal}" />
</test:case>
</test:suite>