001package edu.pdx.cs410J.whitlock;
002
003/**
004 * Class for formatting messages on the server side.  This is mainly to enable
005 * test methods that validate that the server returned expected strings.
006 */
007public class Messages
008{
009    public static String getMappingCount( int count )
010    {
011        return String.format( "Server contains %d key/value pairs", count );
012    }
013
014    public static String formatKeyValuePair( String key, String value )
015    {
016        return String.format("  %s -> %s", key, value);
017    }
018
019    public static String missingRequiredParameter( String parameterName )
020    {
021        return String.format("The required parameter \"%s\" is missing", parameterName);
022    }
023
024    public static String mappedKeyValue( String key, String value )
025    {
026        return String.format( "Mapped %s to %s", key, value );
027    }
028
029    public static String allMappingsDeleted() {
030        return "All mappings have been deleted";
031    }
032}