@Test public void testGetAttributeSet() throws Exception { Set<Attribute> as = gdp.getAttributeSet("abcAccount.tst"); assertNotNull(as); assertEquals(15, as.size()); as.forEach((attr) -> { if (attr.getName().equals("name")) { assertEquals(attr.getValue().get(0), "String"); } else if (attr.getName().equals("id")) { assertEquals(attr.getValue().get(0), 15); } else if (attr.getName().equals("arl")) { assertEquals(attr.getValue().size(), 2); assertEquals(attr.getValue().get(0), "elm1"); assertEquals(attr.getValue().get(1), "elm2"); } else if (attr.getName().equals("ara")) { assertEquals(attr.getValue().size(), 2); assertEquals(attr.getValue().get(0), "elm1"); assertEquals(attr.getValue().get(1), "elm2"); } else if (attr.getName().equals("bool")) { assertEquals(attr.getValue().get(0), true); } else { fail("Unexpected attribute"); } }); }
@Override public Set<Attribute> getAttributeSet(final String propertySetName) { Map<String, Object> propMap = getPropertyMap(propertySetName); assertNotNull(propMap); Set<Attribute> attrSet = new LinkedHashSet<>(); propMap.entrySet().forEach((entry) -> { final String key = entry.getKey(); final Object value = entry.getValue(); if (value.getClass().isArray()) { Object[] array = (Object[]) value; List<?> list = Arrays.asList(array); attrSet.add(AttributeBuilder.build(key, list)); } else if (value instanceof Collection<?>) { attrSet.add(AttributeBuilder.build(key, (Collection<?>) value)); } else { attrSet.add(AttributeBuilder.build(key, value)); } }); return attrSet; }
GroovyDataProvider implements DataProvider { @Override public Set<Attribute> getAttributeSet(final String propertySetName) { Map<String, Object> propMap = getPropertyMap(propertySetName); assertNotNull(propMap); Set<Attribute> attrSet = new LinkedHashSet<>(); propMap.entrySet().forEach((entry) -> { final String key = entry.getKey(); final Object value = entry.getValue(); if (value.getClass().isArray()) { Object[] array = (Object[]) value; List<?> list = Arrays.asList(array); attrSet.add(AttributeBuilder.build(key, list)); } else if (value instanceof Collection<?>) { attrSet.add(AttributeBuilder.build(key, (Collection<?>) value)); } else { attrSet.add(AttributeBuilder.build(key, value)); } }); return attrSet; } }
GroovyDataProvider implements DataProvider { @Override public Set<Attribute> getAttributeSet(final String propertySetName) { Map<String, Object> propMap = getPropertyMap(propertySetName); assertNotNull(propMap); Set<Attribute> attrSet = new LinkedHashSet<>(); propMap.entrySet().forEach((entry) -> { final String key = entry.getKey(); final Object value = entry.getValue(); if (value.getClass().isArray()) { Object[] array = (Object[]) value; List<?> list = Arrays.asList(array); attrSet.add(AttributeBuilder.build(key, list)); } else if (value instanceof Collection<?>) { attrSet.add(AttributeBuilder.build(key, (Collection<?>) value)); } else { attrSet.add(AttributeBuilder.build(key, value)); } }); return attrSet; } GroovyDataProvider();  GroovyDataProvider(String connectorName);   GroovyDataProvider(URL configURL); }
GroovyDataProvider implements DataProvider { @Override public Set<Attribute> getAttributeSet(final String propertySetName) { Map<String, Object> propMap = getPropertyMap(propertySetName); assertNotNull(propMap); Set<Attribute> attrSet = new LinkedHashSet<>(); propMap.entrySet().forEach((entry) -> { final String key = entry.getKey(); final Object value = entry.getValue(); if (value.getClass().isArray()) { Object[] array = (Object[]) value; List<?> list = Arrays.asList(array); attrSet.add(AttributeBuilder.build(key, list)); } else if (value instanceof Collection<?>) { attrSet.add(AttributeBuilder.build(key, (Collection<?>) value)); } else { attrSet.add(AttributeBuilder.build(key, value)); } }); return attrSet; } GroovyDataProvider();  GroovyDataProvider(String connectorName);   GroovyDataProvider(URL configURL); Object get(String name, String type, boolean useDefault); @Override Object get(Class<?> dataTypeName, String name, String componentName,
            int sequenceNumber, boolean isMultivalue); @Override Object get(Class<?> dataTypeName, String name, String componentName); @Override String getString(String name, String componentName, int sequenceNumber); @Override String getString(String name, String componentName); @Override Object getTestSuiteAttribute(String propName); @Override Object getTestSuiteAttribute(String propName, String testName); @Override Object getConnectorAttribute(String propName); @Override Object get(String name); @Override Object generate(String pattern, Class<?> clazz); @Override Object generate(String pattern); @Override Object get(String name, int sequenceNumber); @Override Set<Attribute> getAttributeSet(final String propertySetName); @Override void loadConfiguration(final String configName, Configuration cfg); @Override void dispose(); }
GroovyDataProvider implements DataProvider { @Override public Set<Attribute> getAttributeSet(final String propertySetName) { Map<String, Object> propMap = getPropertyMap(propertySetName); assertNotNull(propMap); Set<Attribute> attrSet = new LinkedHashSet<>(); propMap.entrySet().forEach((entry) -> { final String key = entry.getKey(); final Object value = entry.getValue(); if (value.getClass().isArray()) { Object[] array = (Object[]) value; List<?> list = Arrays.asList(array); attrSet.add(AttributeBuilder.build(key, list)); } else if (value instanceof Collection<?>) { attrSet.add(AttributeBuilder.build(key, (Collection<?>) value)); } else { attrSet.add(AttributeBuilder.build(key, value)); } }); return attrSet; } GroovyDataProvider();  GroovyDataProvider(String connectorName);   GroovyDataProvider(URL configURL); Object get(String name, String type, boolean useDefault); @Override Object get(Class<?> dataTypeName, String name, String componentName,
            int sequenceNumber, boolean isMultivalue); @Override Object get(Class<?> dataTypeName, String name, String componentName); @Override String getString(String name, String componentName, int sequenceNumber); @Override String getString(String name, String componentName); @Override Object getTestSuiteAttribute(String propName); @Override Object getTestSuiteAttribute(String propName, String testName); @Override Object getConnectorAttribute(String propName); @Override Object get(String name); @Override Object generate(String pattern, Class<?> clazz); @Override Object generate(String pattern); @Override Object get(String name, int sequenceNumber); @Override Set<Attribute> getAttributeSet(final String propertySetName); @Override void loadConfiguration(final String configName, Configuration cfg); @Override void dispose(); static final String MULTI_VALUE_TYPE_PREFIX; }