Exemplo n.º 1
0
 /** Test method. */
 @Test
 public void entry() {
   query(EXISTS.args(_MAP_ENTRY.args("A", "B")), true);
   query(EXISTS.args(_MAP_ENTRY.args(1, 2)), true);
   query(EXISTS.args(_MAP_MERGE.args(_MAP_ENTRY.args(1, 2))), "true");
   error(EXISTS.args(_MAP_ENTRY.args("()", 2)), EMPTYFOUND);
   error(EXISTS.args(_MAP_ENTRY.args("(1,2)", 2)), SEQFOUND_X);
 }
Exemplo n.º 2
0
 /** Test method. */
 @Test
 public void merge() {
   // no entry
   query(EXISTS.args(_MAP_MERGE.args(" ()")), true);
   count(_MAP_ENTRY.args(1, 2), 1);
   count(_MAP_MERGE.args(" ()"), 0);
   // single entry
   query(EXISTS.args(_MAP_MERGE.args(" map{ 'a':'b' }")), true);
   count(_MAP_MERGE.args(" map{ 'a':'b' }"), 1);
   // single entry
   query(EXISTS.args(_MAP_MERGE.args(" map{ 'a':'b','b':'c' }")), true);
   count(_MAP_MERGE.args(" map{ 'a':'b','b':'c' }"), 2);
 }