/*
 * $Id$
 * $Revision$
 * $Date$
 *
 * ====================================================================
 * 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.
 */
package wicket.util.time;


import junit.framework.Assert;
import junit.framework.TestCase;

import java.text.ParseException;

import wicket.util.time.Time;
import wicket.util.time.TimeFrame;
import wicket.util.time.TimeMap;
import wicket.util.time.TimeOfDay;

/**
 * Test cases for this object
 * @author Jonathan Locke
 */
public final class TimeMapTest extends TestCase
{
    /**
     * 
     * @throws ParseException
     */
    public void testSimpleStaticTimeFrame() throws ParseException
    {
        final TimeMap map = new TimeMap();
        final Time start = Time.valueOf(TimeOfDay.valueOf("3.14pm"));
        final Time end = Time.valueOf(TimeOfDay.valueOf("3.20pm"));
        final String value = "test";

        map.put(TimeFrame.valueOf(start, end), value);
        Assert.assertEquals(value, map.get(Time.valueOf(TimeOfDay.valueOf("3.15pm"))));
        Assert.assertNull(map.get(Time.valueOf(TimeOfDay.valueOf("3.21pm"))));
        Assert.assertNull(map.get(Time.valueOf(TimeOfDay.valueOf("3.13pm"))));
    }
}



@@ -691,73 +691,8 @@
 ;%0A%0A%0A
-import junit.framework.Assert;%0Aimport junit.framework.TestCase;%0A%0A
 impo
@@ -724,140 +724,132 @@
 on;%0A
-%0A
 import 
-wicket.util.time.Time;%0Aimport wicket.util.time.TimeFram
+java.util.GregorianCalendar;%0Aimport java.util.Local
 e;%0A
+%0A
 import 
-wicket.util.time.TimeMap;%0Aimport wicket.util.time.TimeOfDay
+junit.framework.Assert;%0Aimport junit.framework.TestCase
 ;%0A%0A/
@@ -1184,24 +1184,63 @@
 Day.valueOf(
+new GregorianCalendar(Locale.ENGLISH), 
 %223.14pm%22));%0A
@@ -1291,24 +1291,63 @@
 Day.valueOf(
+new GregorianCalendar(Locale.ENGLISH), 
 %223.20pm%22));%0A
@@ -1509,24 +1509,63 @@
 Day.valueOf(
+new GregorianCalendar(Locale.ENGLISH), 
 %223.15pm%22))))
@@ -1631,16 +1631,55 @@
 valueOf(
+new GregorianCalendar(Locale.ENGLISH), 
 %223.21pm%22
@@ -1749,16 +1749,55 @@
 valueOf(
+new GregorianCalendar(Locale.ENGLISH), 
 %223.13pm%22
@@ -1810,10 +1810,8 @@
     %7D%0A%7D%0A
-%0A%0A

test should pass now even in china => use of locale