use of com.ctrip.framework.apollo.internals.RemoteConfigRepository in project apollo by ctripcorp.
the class DefaultConfigFactoryFileCachePropertyTest method testCreateFileDisableConfigRepository.
@Test
public void testCreateFileDisableConfigRepository() throws Exception {
RemoteConfigRepository someRemoteConfigRepository = mock(RemoteConfigRepository.class);
when(someConfigUtil.isPropertyFileCacheEnabled()).thenReturn(false);
doReturn(someRemoteConfigRepository).when(configFactory).createRemoteConfigRepository(someNamespace);
ConfigRepository configRepository = configFactory.createConfigRepository(someNamespace);
assertSame(someRemoteConfigRepository, configRepository);
verify(configFactory, never()).createLocalConfigRepository(someNamespace);
verify(configFactory, times(1)).createRemoteConfigRepository(someNamespace);
}
Aggregations