@@ -0,0 +1,2088 @@
+/*%0A *  Copyright 1999-2018 Alibaba Group Holding Ltd.%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 com.alibaba.fescar.config;%0A%0Aimport com.alibaba.fescar.common.exception.NotSupportYetException;%0Aimport org.junit.Test;%0A%0Aimport static com.alibaba.fescar.config.ConfigurationFactory.FILE_INSTANCE;%0Aimport static org.assertj.core.api.Assertions.assertThat;%0A%0A/**%0A * @author Wu%0A * @date 2019/3/9%0A */%0Apublic class ConfigurationFactoryTest %7B%0A    /**%0A     * get config type from registry.conf%0A     */%0A    private final static ConfigType CONFIG_TYPE = ConfigType.getType(%0A            FILE_INSTANCE.getConfig(ConfigurationKeys.FILE_ROOT_CONFIG + ConfigurationKeys.FILE_CONFIG_SPLIT_CHAR%0A                    + ConfigurationKeys.FILE_ROOT_TYPE));%0A%0A    /**%0A     * test for getInstance method%0A     */%0A    @Test%0A    public void testGetInstance() %7B%0A        try %7B%0A            Configuration configuration = ConfigurationFactory.getInstance();%0A            if (ConfigType.Nacos.equals(CONFIG_TYPE)) %7B//Nacos case%0A                assertThat(configuration).isInstanceOf(NacosConfiguration.class);%0A            %7D else if (ConfigType.Apollo.equals(CONFIG_TYPE)) %7B//Apollo case%0A                assertThat(configuration).isInstanceOf(ApolloConfiguration.class);%0A            %7D else %7B//File case%0A                assertThat(configuration).isInstanceOf(FileConfiguration.class);%0A            %7D%0A        %7D catch (NotSupportYetException e) %7B%0A            //try to get NotSupportYetException%0A            assertThat(e).hasMessage(%22not support register type:%22 + CONFIG_TYPE);%0A        %7D%0A    %7D%0A%7D%0A

Add test cases for ConfigurationFactory (#570)