Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Tiede2014-09-01 11:46:44 +0000
committerMarkus Tiede2014-09-01 12:17:44 +0000
commita7ca7108d3bccab65e384c36027c1661cf5b2e09 (patch)
treee86ed7d5b68142295b3838056584d1d9292ae49a
parentad659e20ab44d5fbdc6ade4eecb4cc95a2a0f6a2 (diff)
downloadorg.eclipse.jubula.core-a7ca7108d3bccab65e384c36027c1661cf5b2e09.tar.gz
org.eclipse.jubula.core-a7ca7108d3bccab65e384c36027c1661cf5b2e09.tar.xz
org.eclipse.jubula.core-a7ca7108d3bccab65e384c36027c1661cf5b2e09.zip
Non-sprint task - minor enhancement for getAttributeFunction: extended with retrieval of taskId and raw description text - fixed attribute name.
-rw-r--r--org.eclipse.jubula.client.core.functions/src/org/eclipse/jubula/client/core/functions/NodeAttributeEvaluator.java5
-rw-r--r--org.eclipse.jubula.documentation/manual/en/tex/Tasks/Testdata/functions.tex2
2 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.jubula.client.core.functions/src/org/eclipse/jubula/client/core/functions/NodeAttributeEvaluator.java b/org.eclipse.jubula.client.core.functions/src/org/eclipse/jubula/client/core/functions/NodeAttributeEvaluator.java
index 35c036ce3..3d3077419 100644
--- a/org.eclipse.jubula.client.core.functions/src/org/eclipse/jubula/client/core/functions/NodeAttributeEvaluator.java
+++ b/org.eclipse.jubula.client.core.functions/src/org/eclipse/jubula/client/core/functions/NodeAttributeEvaluator.java
@@ -11,6 +11,7 @@
package org.eclipse.jubula.client.core.functions;
import org.eclipse.jubula.client.core.model.INodePO;
+import org.eclipse.jubula.client.core.propertytester.NodePropertyTester;
import org.eclipse.jubula.tools.exception.InvalidDataException;
import org.eclipse.jubula.tools.messagehandling.MessageIDs;
@@ -28,7 +29,7 @@ public class NodeAttributeEvaluator extends AbstractFunctionEvaluator {
private static final String DESCRIPTION_ATTRIBUTE = "description"; //$NON-NLS-1$
/** the taskId attribute name */
- private static final String TASK_ID_ATTRIBUTE = "taskId"; //$NON-NLS-1$
+ private static final String TASK_ID_ATTRIBUTE = "task.id"; //$NON-NLS-1$
/** {@inheritDoc} */
public String evaluate(String[] arguments) throws InvalidDataException {
@@ -49,7 +50,7 @@ public class NodeAttributeEvaluator extends AbstractFunctionEvaluator {
attributeValue = node.getDescription();
break;
case TASK_ID_ATTRIBUTE:
- attributeValue = node.getTaskId();
+ attributeValue = NodePropertyTester.getTaskIdforNode(node);
break;
default:
throw new InvalidDataException("Unkown attribute: " //$NON-NLS-1$
diff --git a/org.eclipse.jubula.documentation/manual/en/tex/Tasks/Testdata/functions.tex b/org.eclipse.jubula.documentation/manual/en/tex/Tasks/Testdata/functions.tex
index 3e910f0da..040612d93 100644
--- a/org.eclipse.jubula.documentation/manual/en/tex/Tasks/Testdata/functions.tex
+++ b/org.eclipse.jubula.documentation/manual/en/tex/Tasks/Testdata/functions.tex
@@ -41,7 +41,7 @@ The following functions give their results as decimal numbers, e.g. 1.0, 1.2 etc
\textbf{Test functions}\\
\begin{description}
-\item [getNodeAttribute]{Reads the value on the node (e.g. \gdcase{}, \gdstep{}) on which this function is resolved, and uses this as the data for the \gdstep{}. It has four possible arguments, \bxname{name} reads the name of the node, \bxname{comment} reads the comment on the node, \bxname{description} reads the raw (non-rendered) description on the node, and \bxname{taskId} reads the task ID on the node. If the comment is empty, the value used is \bxname{null}. If you have overwritten either the name or the comment at this place of reuse, then these new details are used.}
+\item [getNodeAttribute]{Reads the value on the node (e.g. \gdcase{}, \gdstep{}) on which this function is resolved, and uses this as the data for the \gdstep{}. It has four possible arguments, \bxname{name} reads the name of the node, \bxname{comment} reads the comment on the node, \bxname{description} reads the raw (non-rendered) description on the node, and \bxname{task.id} reads the task ID on the node. If the comment is empty, the value used is \bxname{null}. If you have overwritten either the name or the comment at this place of reuse, then these new details are used.}
\item [getCentralTestDataSetValue]{Use this function to access a value saved in a central data set. This lets you combine values that you have defined centrally with values that you use locally, or lets you combine values from different central data sets in your test. It locates a single cell in a specific central data set based on a value in a column that you define as a key, and a column in which to search for the required value. It requires four arguments: the name of the central data set to search in, the name of the column which you wish to use as a ''key'' (you can name the column KEY if you require), the value in the key column (to specify the line), and the column in which the required data cell is located.}
\end{description}

Back to the top