Untitled
unknown
plain_text
2 months ago
943 B
0
Indexable
Never
public class BindingPropertiesToGacServiceTest { private static GacProperties gacProperties; @BeforeEach public void init() { YamlPropertiesFactoryBean factoryBean = new YamlPropertiesFactoryBean(); factoryBean.setResources(new ClassPathResource("./config/investmentsmiddleware-api.yml")); Properties properties = factoryBean.getObject(); ConfigurationPropertySource propertySource = new MapConfigurationPropertySource(properties); Binder binder = new Binder(propertySource); gacProperties = binder.bind("c24.bank.investmentsmiddleware.api.clients.gac", GacProperties.class).get(); } @Test void testBindingProperties() { var logos = gacProperties.getBanksLogo(); var flags = gacProperties.getCountriesFlag(); var appLogo = gacProperties.getAppLogo(); Assertions.assertFalse(logos.isEmpty()); Assertions.assertFalse(flags.isEmpty()); Assertions.assertFalse(appLogo.isEmpty()); } }