Skip to Content.
Sympa Menu

perfsonar-dev - r2025 - trunk/functional-testing/sqlma/l2/SetupDataRequest

Subject: perfsonar development work

List archive

r2025 - trunk/functional-testing/sqlma/l2/SetupDataRequest


Chronological Thread 
  • From:
  • To:
  • Subject: r2025 - trunk/functional-testing/sqlma/l2/SetupDataRequest
  • Date: Fri, 2 Feb 2007 07:21:23 -0500

Author: michalis
Date: 2007-02-02 07:21:18 -0500 (Fri, 02 Feb 2007)
New Revision: 2025

Modified:
trunk/functional-testing/sqlma/l2/SetupDataRequest/SetupDataRequests.java
Log:
Finished SetupData request creator class

Modified:
trunk/functional-testing/sqlma/l2/SetupDataRequest/SetupDataRequests.java
===================================================================
--- trunk/functional-testing/sqlma/l2/SetupDataRequest/SetupDataRequests.java
2007-02-01 15:50:36 UTC (rev 2024)
+++ trunk/functional-testing/sqlma/l2/SetupDataRequest/SetupDataRequests.java
2007-02-02 12:21:18 UTC (rev 2025)
@@ -358,7 +358,7 @@


"ibatis-SqlMapConfig-L2-status-domain.xml",

"Path.Status")));

- Element metadata =
utilities.createMetadata("meta3", utilities
+ Element metadata =
utilities.createMetadata("meta4", utilities

.createMetadataElements_Time(parameterSettings_now,
"select"));
metadata.getChild("subject",
select).setAttribute(
@@ -460,24 +460,1149 @@
else if (testCase == 2) {
String[] parameterSettings_now = new String[2];
String[] parameterSettings_frame = new String[4];
-
+
switch (subTestCase) {
- // A request addressing a non existing link
+ // A request where nmwg namespace is not set right
case 1:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+
+ nmwg = Namespace.getNamespace("nmwg",
+
"http://ggf.org/ns/nmwgother/2.0/";);
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
doc.getRootElement().addContent(
-
utilities.createMetadata("meta1", utilities
-
.createMetadata1Elements_Link("PSNC-DFN-FOO",
-
"logical", "Path.Status")));
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+
+ nmwg = Namespace.getNamespace("nmwg",
+
"http://ggf.org/ns/nmwgother/2.0/";);
+
+ break;
+ // A request where the select namespace is not set
correctly
+ case 2:
parameterSettings_now[0] = "time";
parameterSettings_now[1] = "now";
+
+ select = Namespace.getNamespace("select",
+
"http://ggf.org/ns/nmwg/nops/select/2.0/";);
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
doc.getRootElement().addContent(

utilities.createMetadata("meta2", utilities

.createMetadataElements_Time(

parameterSettings_now, "select")));
+
doc.getRootElement().addContent(
utilities.createData("data1",
"meta2"));
+
+ select = Namespace.getNamespace("select",
+
"http://ggf.org/ns/nmwg/ops/select/2.0/";);
break;
+ // A request where the type attribute is empty
+ case 3:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";

+
doc.getRootElement().getAttribute("type").setValue("");
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+
+ break;
+ // A request where the type attribute is other than
SetupDataRequest
+ case 4:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+
+
doc.getRootElement().getAttribute("type").setValue("SomeValue");
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+
+ // A request with no id attribute
+ case 5:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+
+ doc.getRootElement().removeAttribute("type");
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+
+ // A request where the id attributes value is missing
in the first
+ // element
+ case 6:
+
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+
+ // A request with no id attribute value in the second
metadata
+ case 7:
+
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+ doc.getRootElement().addContent(
+ utilities.createMetadata("",
utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+ // A request where the key element is missing
+ case 8:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+
+ Element metadata = new Element("metadata",
nmwg);
+ metadata.setAttribute("id", "meta1");
+ doc.getRootElement().addContent(metadata);
+
+ doc.getRootElement().addContent(
+ utilities.createMetadata("",
utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+ // A request where the parameters elemenet is missing
+ case 9:
+
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+
+ metadata = new Element("metadata", nmwg);
+ metadata.setAttribute("id", "meta1");
+ metadata.addContent(new Element("key", nmwg));
+ doc.getRootElement().addContent(metadata);
+
+ doc.getRootElement().addContent(
+ utilities.createMetadata("",
utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+
+ // A request where the ibatis config parameter has no
value
+ case 10:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+
+ doc.getRootElement().addContent(
+
utilities.createKeyMetadata("meta1", utilities
+
.createKeyElements("PSNC-DFN-MUE-Link-1001",
+
"", "Path.Status")));
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+
+ // A request where the path id parameter has no value
+ case 11:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+
+ // A request where the event type parameter has no
value
+ case 12:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"")));
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+ // A request where the ibatis config parameter has a
wrong value
+ case 13:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+
+ doc.getRootElement().addContent(
+
utilities.createKeyMetadata("meta1", utilities
+
.createKeyElements("PSNC-DFN-MUE-Link-1001",
+
"ibatis-SqlMapConfig-L2-status.xml",
+
"Path.Status")));
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+ // A request where the path id parameter has a wrong
value
+ case 14:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1006",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+ // A request where the event type parameter has a
wrong value
+ case 15:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Status")));
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+ // A request where the ibatis config parameter
element is missing
+ case 16:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+ Hashtable elements =
utilities.createKeyElements(
+ "PSNC-DFN-MUE-Link-1001",
+
"ibatis-SqlMapConfig-L2-status-domain.xml",
+ "Path.Status");
+ elements.remove("ibatis");
+ metadata =
utilities.createKeyMetadata("meta1", elements);
+ doc.getRootElement().addContent(metadata);
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+ // A request where the path id parameter element is
missing
+ case 17:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+ elements = utilities.createKeyElements(
+ "PSNC-DFN-MUE-Link-1001",
+
"ibatis-SqlMapConfig-L2-status-domain.xml",
+ "Path.Status");
+ elements.remove("pathId");
+ metadata =
utilities.createKeyMetadata("meta1", elements);
+ doc.getRootElement().addContent(metadata);
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+ // A request where the event type parameter element
is missing
+ case 18:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+ elements = utilities.createKeyElements(
+ "PSNC-DFN-MUE-Link-1001",
+
"ibatis-SqlMapConfig-L2-status-domain.xml",
+ "Path.Status");
+ elements.remove("eventType");
+ metadata =
utilities.createKeyMetadata("meta1", elements);
+ doc.getRootElement().addContent(metadata);
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+ // A request where the name attribute of the ibatis
config parameter
+ // has no value
+ case 19:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+ elements = utilities.createKeyElements(
+ "PSNC-DFN-MUE-Link-1001",
+
"ibatis-SqlMapConfig-L2-status-domain.xml",
+ "Path.Status");
+ Element el = (Element) elements.get("ibatis");
+ el.getAttribute("name").setValue("");
+ metadata =
utilities.createKeyMetadata("meta1", elements);
+ doc.getRootElement().addContent(metadata);
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+
+ // A request where the name attribute of path id
parameter element
+ // has no value
+ case 20:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+ elements = utilities.createKeyElements(
+ "PSNC-DFN-MUE-Link-1001",
+
"ibatis-SqlMapConfig-L2-status-domain.xml",
+ "Path.Status");
+ el = (Element) elements.get("pathId");
+ el.getAttribute("name").setValue("");
+ metadata =
utilities.createKeyMetadata("meta1", elements);
+ doc.getRootElement().addContent(metadata);
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+ // A request where the name attribute of event Type
parameter
+ // element has no value
+ case 21:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+ elements = utilities.createKeyElements(
+ "PSNC-DFN-MUE-Link-1001",
+
"ibatis-SqlMapConfig-L2-status-domain.xml",
+ "Path.Status");
+ el = (Element) elements.get("eventType");
+ el.getAttribute("name").setValue("");
+ metadata =
utilities.createKeyMetadata("meta1", elements);
+ doc.getRootElement().addContent(metadata);
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+
+ // A request where the name attribute of the ibatis
config parameter
+ // element has a wrong value
+ case 22:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+ elements = utilities.createKeyElements(
+ "PSNC-DFN-MUE-Link-1001",
+
"ibatis-SqlMapConfig-L2-status-domain.xml",
+ "Path.Status");
+ el = (Element) elements.get("ibatis");
+ el.getAttribute("name").setValue("somevalue");
+ metadata =
utilities.createKeyMetadata("meta1", elements);
+ doc.getRootElement().addContent(metadata);
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+ // A request where the name attribute of the path id
parameter
+ // element has a wrong value
+ case 23:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+ elements = utilities.createKeyElements(
+ "PSNC-DFN-MUE-Link-1001",
+
"ibatis-SqlMapConfig-L2-status-domain.xml",
+ "Path.Status");
+ el = (Element) elements.get("pathId");
+ el.getAttribute("name").setValue("somevalue");
+ metadata =
utilities.createKeyMetadata("meta1", elements);
+ doc.getRootElement().addContent(metadata);
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+
+ // A request where the name attribute of the event
type parameter
+ // element has a wrong value
+ case 24:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+ elements = utilities.createKeyElements(
+ "PSNC-DFN-MUE-Link-1001",
+
"ibatis-SqlMapConfig-L2-status-domain.xml",
+ "Path.Status");
+ el = (Element) elements.get("eventType");
+ el.getAttribute("name").setValue("somevalue");
+ metadata =
utilities.createKeyMetadata("meta1", elements);
+ doc.getRootElement().addContent(metadata);
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+ // A request where the name attribute of the ibatis
config parameter
+ // element is missing
+ case 25:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+ elements = utilities.createKeyElements(
+ "PSNC-DFN-MUE-Link-1001",
+
"ibatis-SqlMapConfig-L2-status-domain.xml",
+ "Path.Status");
+ el = (Element) elements.get("ibatis");
+ el.removeAttribute("name");
+ metadata =
utilities.createKeyMetadata("meta1", elements);
+ doc.getRootElement().addContent(metadata);
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+
+ // A request where the name attribute of the path id
parameter
+ // element is missing
+ case 26:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+ elements = utilities.createKeyElements(
+ "PSNC-DFN-MUE-Link-1001",
+
"ibatis-SqlMapConfig-L2-status-domain.xml",
+ "Path.Status");
+ el = (Element) elements.get("pathId");
+ el.removeAttribute("name");
+ metadata =
utilities.createKeyMetadata("meta1", elements);
+ doc.getRootElement().addContent(metadata);
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+ // A request where the name attribute of the ibatis
config parameter
+ // element is missing
+ case 27:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+ elements = utilities.createKeyElements(
+ "PSNC-DFN-MUE-Link-1001",
+
"ibatis-SqlMapConfig-L2-status-domain.xml",
+ "Path.Status");
+ el = (Element) elements.get("eventType");
+ el.removeAttribute("name");
+ metadata =
utilities.createKeyMetadata("meta1", elements);
+ doc.getRootElement().addContent(metadata);
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+ // A request where the name attribute of the
parametrers elemnt is
+ // not now
+ case 28:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "not_now";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+
+ break;
+ // A request where te name attribute of the
parameters elements is
+ // not start time
+
+ case 29:
+ parameterSettings_frame[0] = "not_startTime";
+ parameterSettings_frame[1] = "1144318523";
+ parameterSettings_frame[2] = "endTime";
+ parameterSettings_frame[3] = "1147960133";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_frame, "select")));
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+
+ break;
+ // A request where the name attribute of the
parameter element is
+ // not end time
+
+ case 30:
+ parameterSettings_frame[0] = "startTime";
+ parameterSettings_frame[1] = "1144318523";
+ parameterSettings_frame[2] = "not_endTime";
+ parameterSettings_frame[3] = "1147960133";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_frame, "select")));
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+
+ break;
+ // A request where the name attribute of the
parameter element has
+ // no value
+ case 31:
+ parameterSettings_now[0] = "";
+ parameterSettings_now[1] = "now";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+ break;
+
+ // A request where the name attribute of the
parameter element has
+ // no value
+
+ case 32:
+ parameterSettings_frame[0] = "";
+ parameterSettings_frame[1] = "1144318523";
+ parameterSettings_frame[2] = "endTime";
+ parameterSettings_frame[3] = "1147960133";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_frame, "select")));
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+
+ break;
+ // A request where the name attribute of the
parameter element has
+ // no value
+
+ case 33:
+ parameterSettings_frame[0] = "startTime";
+ parameterSettings_frame[1] = "1144318523";
+ parameterSettings_frame[2] = "";
+ parameterSettings_frame[3] = "1147960133";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_frame, "select")));
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+
+ break;
+
+ // A request where the parameter element has no value
+ case 34:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+
+ break;
+ // A request where the parameter element has no value
+
+ case 35:
+ parameterSettings_frame[0] = "startTime";
+ parameterSettings_frame[1] = "";
+ parameterSettings_frame[2] = "endTime";
+ parameterSettings_frame[3] = "1147960133";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_frame, "select")));
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+
+ break;
+ // A request where parameter element has no value
+
+ case 36:
+ parameterSettings_frame[0] = "startTime";
+ parameterSettings_frame[1] = "1144318523";
+ parameterSettings_frame[2] = "endTime";
+ parameterSettings_frame[3] = "";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_frame, "select")));
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+
+ break;
+
+ // A request where the parameter element has a non
valid value
+ case 37:
+
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "before";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+
+ break;
+ // A request where the parameter element has a non
valid value
+
+ case 38:
+
+ parameterSettings_frame[0] = "startTime";
+ parameterSettings_frame[1] = "1200000000";
+ parameterSettings_frame[2] = "endTime";
+ parameterSettings_frame[3] = "1147960133";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_frame, "select")));
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+
+ break;
+ // A request where parameter element has a non valid
value
+
+ case 39:
+
+ parameterSettings_frame[0] = "startTime";
+ parameterSettings_frame[1] = "1144318523";
+ parameterSettings_frame[2] = "endTime";
+ parameterSettings_frame[3] = "1100000000";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_frame, "select")));
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+
+ break;
+
+ case 40:
+ // A request where the second metadata
metadataIdRef attribute
+ // has a non valid value
+
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+
+ metadata = utilities.createMetadata("meta2",
utilities
+
.createMetadataElements_Time(parameterSettings_now,
+ "select"));
+ metadata.getChild("subject",
select).setAttribute(
+ "metadataIdRef", "meta4");
+ doc.getRootElement().addContent(metadata);
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+
+ break;
+ // A request where the second metadata metadataIdRef
attribute is
+ // empty
+
+ case 41:
+
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+
+ metadata = utilities.createMetadata("meta2",
utilities
+
.createMetadataElements_Time(parameterSettings_now,
+ "select"));
+ metadata.getChild("subject",
select).setAttribute(
+ "metadataIdRef", "");
+ doc.getRootElement().addContent(metadata);
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+
+ break;
+
+ case 42:
+ // A request where the second metadata
metadataIdRef attribute
+ // is missing
+
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+
+ metadata = utilities.createMetadata("meta2",
utilities
+
.createMetadataElements_Time(parameterSettings_now,
+ "select"));
+ metadata.getChild("subject",
select).removeAttribute(
+ "metadataIdRef");
+ doc.getRootElement().addContent(metadata);
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"meta2"));
+
+ break;
+
+ // A request where the data element is missing
+
+ case 43:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+
+ break;
+
+ // A request metadataIdRef attribute of the data
element has no
+ // value
+
+ case 44:
+
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
""));
+
+ break;
+
+ // A request where the metadaraIdRef attribute of the
data element
+ // has an invalid value
+
+ case 45:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+ doc.getRootElement().addContent(
+ utilities.createData("data1",
"no_meta"));
+
+ break;
+
+ // A request where the metadataIdRef attribute of the
data element
+ // is missing
+
+ case 46:
+ parameterSettings_now[0] = "time";
+ parameterSettings_now[1] = "now";
+
+ doc
+ .getRootElement()
+ .addContent(
+ utilities
+
.createKeyMetadata(
+
"meta1",
+
utilities
+
.createKeyElements(
+
"PSNC-DFN-MUE-Link-1001",
+

"ibatis-SqlMapConfig-L2-status-domain.xml",
+
"Path.Status")));
+
+ doc.getRootElement().addContent(
+
utilities.createMetadata("meta2", utilities
+
.createMetadataElements_Time(
+
parameterSettings_now, "select")));
+ Element data = utilities.createData("data1",
"");
+ data.removeAttribute("metadataIdRef");
+ doc.getRootElement().addContent(data);
+
+ break;
+
}

}
@@ -507,7 +1632,7 @@
SetupDataRequests creator = new SetupDataRequests();
boolean f = (new File(args[0])).mkdir();
int i;
- for (i = 1; i < 2; i++) {
+ for (i = 1; i < 3; i++) {
if (i == 1) {
System.out
.print("The first
group of cases is constracted(12)...");
@@ -520,8 +1645,8 @@
}
if (i == 2) {
System.out
- .print("The second
group of cases is constracted(4)...");
- for (int j = 1; j < 5; j++) {
+ .print("The second
group of cases is constracted(46)...");
+ for (int j = 1; j < 47; j++) {

creator.createSetupDataKeyRequests(i, j, args[0]
+ "/c_" + i +
"_" + j + ".xml");
}



  • r2025 - trunk/functional-testing/sqlma/l2/SetupDataRequest, svnlog, 02/02/2007

Archive powered by MHonArc 2.6.16.

Top of Page