Clover coverage report - Code Coverage for tapestry release 4.0-beta-5
Coverage timestamp: Fri Aug 26 2005 21:16:17 EDT
file stats: LOC: 65   Methods: 5
NCLOC: 39   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
FormMessages.java - 80% 80% 80%
coverage coverage
 1    // Copyright 2005 The Apache Software Foundation
 2    //
 3    // Licensed under the Apache License, Version 2.0 (the "License");
 4    // you may not use this file except in compliance with the License.
 5    // You may obtain a copy of the License at
 6    //
 7    // http://www.apache.org/licenses/LICENSE-2.0
 8    //
 9    // Unless required by applicable law or agreed to in writing, software
 10    // distributed under the License is distributed on an "AS IS" BASIS,
 11    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12    // See the License for the specific language governing permissions and
 13    // limitations under the License.
 14   
 15    package org.apache.tapestry.form;
 16   
 17    import org.apache.hivemind.impl.MessageFormatter;
 18    import org.apache.tapestry.IComponent;
 19   
 20    /**
 21    * @author Howard M. Lewis Ship
 22    * @since 4.0
 23    */
 24    class FormMessages
 25    {
 26    private final static MessageFormatter _formatter = new MessageFormatter(FormMessages.class);
 27   
 28  1 static String formTooManyIds(IComponent form, int actualCount, IComponent component)
 29    {
 30  1 return _formatter.format(
 31    "form-too-many-ids",
 32    form.getExtendedId(),
 33    new Integer(actualCount),
 34    component.getExtendedId());
 35    }
 36   
 37  2 static String formIdMismatch(IComponent form, int mismatchIndex, String expectedId,
 38    String actualId, IComponent component)
 39    {
 40  2 return _formatter.format("form-id-mismatch", new Object[]
 41    { form.getExtendedId(), new Integer(mismatchIndex + 1), expectedId, actualId,
 42    component.getExtendedId() });
 43    }
 44   
 45  1 static String formTooFewIds(IComponent form, int remainingCount, String nextExpectedId)
 46    {
 47  1 return _formatter.format("form-too-few-ids", form.getExtendedId(), new Integer(
 48    remainingCount), nextExpectedId);
 49    }
 50   
 51  1 static String encodingTypeContention(IComponent form, String establishedEncodingType,
 52    String newEncodingType)
 53    {
 54  1 return _formatter.format(
 55    "encoding-type-contention",
 56    form.getExtendedId(),
 57    establishedEncodingType,
 58    newEncodingType);
 59    }
 60   
 61  0 static String fieldAlreadyPrerendered(IComponent field)
 62    {
 63  0 return _formatter.format("field-already-prerenderer", field);
 64    }
 65    }