@@ -0,0 +1,2000 @@
+/*%0A * $Header: /home/jerenkrantz/tmp/commons/commons-convert/cvs/home/cvs/jakarta-commons//chain/apps/mailreader/src/test/org/apache/commons/mailreader/ChangeLocaleTest.java,v 1.1 2004/03/29 00:54:23 husted Exp $%0A * $Revision: 1.1 $%0A * $Date: 2004/03/29 00:54:23 $%0A *%0A * Copyright 2000-2004 Apache Software Foundation%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.apache.commons.mailreader;%0A%0Aimport junit.framework.TestCase;%0Aimport org.apache.commons.chain.Command;%0Aimport org.apache.commons.chain.Context;%0Aimport org.apache.commons.chain.mailreader.MailReader;%0Aimport org.apache.commons.chain.mailreader.MailReaderBase;%0Aimport org.apache.commons.chain.mailreader.commands.LocaleChange;%0Aimport org.apache.commons.chain.impl.ContextBase;%0A%0Aimport java.util.Locale;%0A%0A/**%0A */%0Apublic class ChangeLocaleTest extends TestCase %7B%0A%0A    private Command command;%0A%0A    public void setUp() %7B%0A%0A        command = new LocaleChange();%0A%0A    %7D%0A%0A    public void testCanadaFrench() %7B%0A%0A        Locale original = Locale.US;%0A        Locale expected = Locale.CANADA_FRENCH;%0A%0A        Context input = new ContextBase();%0A        input.put(MailReader.PN_COUNTRY,%22CA%22);%0A        input.put(MailReader.PN_LANGUAGE,%22FR%22);%0A%0A        MailReader context = new MailReaderBase(original,input);%0A%0A        try %7B%0A            command.execute(context);%0A        %7D%0A        catch(Exception e) %7B%0A            fail(e.getMessage());%0A        %7D%0A%0A        assertEquals(%22Unexpected Locale%22,expected,context.getLocale());%0A%0A    %7D%0A%0A%7D%0A

Add LocaleChange test