/*
 * TestLayeredProperties.java  $Revision: 1.3 $  $Date: 2007/10/03 04:59:32 $
 *
 * Copyright (C) 2007 Meldcraft Corporation
 *
 * This file is part of Scaffold.
 * 
 * Scaffold is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Scaffold is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with Scaffold.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.meldcraft.util;

import java.util.Map;
import java.io.IOException;

import junit.framework.TestCase;

/**
 * @version $Revision: 1.3 $ $Date: 2007/10/03 04:59:32 $
 * @author Rob Richards
 */
public class TestLayeredProperties extends TestCase
{
//  Static variables
//  Member variables
//  Constructors and initialization
//  Public methods
    public void testSimpleProperties() throws IOException
    {
        Map map = LayeredProperties.getProperties(this);
System.err.println(java.util.Arrays.asList(map.keySet().toArray()));
        String[] props = {"item0", "item1", "item2"};
        for (int i=0 ; i < props.length ; i++)
        {
            String prop = props[i];
            String str = (String)map.get(prop);
            assertEquals(str, prop);
        }
    }

    public void testLayeredProperties() throws IOException
    {
        Map map = LayeredProperties.getProperties(this);
        String str = (String)map.get("layered");
        assertEquals(str, "layer2");
    }

    public void testAddedProperties() throws IOException
    {
        Map map = LayeredProperties.getProperties(this);
        String str = (String)map.get("added");
        assertEquals(str, "012");
    }

//  Protected methods
//  Private methods
//  Inner classes    
}



