Exemplo n.º 1
0
        /**
         * Add property to test element
         * @param property {@link JMeterProperty} to add to current Test Element
         * @param clone clone property
         */
        protected void addProperty(NetMeterProperty property, bool clone)
        {
            NetMeterProperty propertyToPut = property;

            if (clone)
            {
                propertyToPut = property.clone();
            }
            if (isRunningVersion())
            {
                setTemporary(propertyToPut);
            }
            else
            {
                clearTemporary(property);
            }
            NetMeterProperty prop = getProperty(property.getName());

            if (prop is NullProperty || (prop is StringProperty && prop.getStringValue().Equals("")))
            {
                propDic.Add(property.getName(), propertyToPut);
            }
            else
            {
                prop.mergeIn(propertyToPut);
            }
        }
Exemplo n.º 2
0
        /**
         * Add to result the values of propertyNames
         * @param result List<String> values of propertyNames
         * @param propertyNames Set<String> properties to extract
         */
        protected sealed void addPropertiesValues(List <String> result, HashSet <String> propertyNames)
        {
            PropertyIterator iterator = propertyIterator();

            while (iterator.hasNext())
            {
                NetMeterProperty jMeterProperty = iterator.next();
                if (propertyNames.Contains(jMeterProperty.getName()))
                {
                    result.Add(jMeterProperty.getStringValue());
                }
            }
        }
Exemplo n.º 3
0
        /**
         * {@inheritDoc}}
         */
        public List <String> getSearchableTokens()
        {
            List <String> result = new List <String>(25);

            foreach (String res in result)
            {
            }

            PropertyIterator iterator = propertyIterator();

            while (iterator.hasNext())
            {
                NetMeterProperty jMeterProperty = iterator.next();
                result.Add(jMeterProperty.getName());
                result.Add(jMeterProperty.getStringValue());
            }
            return(result);
        }
Exemplo n.º 4
0
        public String getPropertyAsString(String key, String defaultValue)
        {
            NetMeterProperty jmp = getProperty(key);

            return(jmp is NullProperty ? defaultValue : jmp.getStringValue());
        }