/*
 * Copyright (C) 2008 feilong
 *
 * 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 com.feilong;

import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.hasProperty;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;

import java.util.Map;

import org.junit.BeforeClass;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

import com.feilong.entity.DIUser;

public class SpringDIMapTest{

    /** The file system context. */
    private static ApplicationContext fileSystemContext;

    /**
     * Before class.
     */
    @BeforeClass
    public static void beforeClass(){
        fileSystemContext = new FileSystemXmlApplicationContext("classpath:spring-DI-Map.xml");
    }

    /**
     * Test.
     */
    @Test
    public void test(){
        DIUser diUser = (DIUser) fileSystemContext.getBean("feitian@");

        Map<String, Object> map = diUser.getMap();
        assertThat(map.get("五子良将"), allOf(hasProperty("isSuccess", is(false)), hasProperty("description", is("哈哈哈"))));
        assertThat(map.get("八虎骑"), allOf(hasProperty("isSuccess", is(true)), hasProperty("description", is("呵呵呵"))));
    }
}
@@ -1599,28 +1599,25 @@
 ty(%22
-isSuccess
+code
 %22, is(
+%22
 false
+%22
 )), 
@@ -1625,35 +1625,33 @@
 asProperty(%22
-description
+loginName
 %22, is(%22%E5%93%88%E5%93%88%E5%93%88%22)
@@ -1713,27 +1713,24 @@
 ty(%22
-isSuccess
+code
 %22, is(
+%22
 true
+%22
 )), 
@@ -1746,19 +1746,17 @@
 ty(%22
-description
+loginName
 %22, i

update javadoc