use of io.cdap.cdap.api.macro.Macros in project cdap by caskdata.
the class ArtifactRepositoryTest method testPluginProperties.
@Test
public void testPluginProperties() {
PluginProperties pluginProperties = PluginProperties.builder().add("class.name", TEST_EMPTY_CLASS).add("timeout", "10").add("name", "${macro}").build();
Assert.assertTrue(pluginProperties.getMacros().getLookups().isEmpty());
Set<String> lookups = new HashSet<>();
lookups.add("macro");
PluginProperties updatedPluginProperties = pluginProperties.setMacros(new Macros(lookups, new HashSet<>()));
Assert.assertTrue(pluginProperties.getMacros().getLookups().isEmpty());
Assert.assertEquals(lookups, updatedPluginProperties.getMacros().getLookups());
Assert.assertTrue(updatedPluginProperties.getMacros().getMacroFunctions().isEmpty());
}
use of io.cdap.cdap.api.macro.Macros in project cdap by cdapio.
the class ArtifactRepositoryTest method testPluginProperties.
@Test
public void testPluginProperties() {
PluginProperties pluginProperties = PluginProperties.builder().add("class.name", TEST_EMPTY_CLASS).add("timeout", "10").add("name", "${macro}").build();
Assert.assertTrue(pluginProperties.getMacros().getLookups().isEmpty());
Set<String> lookups = new HashSet<>();
lookups.add("macro");
PluginProperties updatedPluginProperties = pluginProperties.setMacros(new Macros(lookups, new HashSet<>()));
Assert.assertTrue(pluginProperties.getMacros().getLookups().isEmpty());
Assert.assertEquals(lookups, updatedPluginProperties.getMacros().getLookups());
Assert.assertTrue(updatedPluginProperties.getMacros().getMacroFunctions().isEmpty());
}
Aggregations