Skip to main content

[el-spec commits] [el-spec~source-code:40] Remove LinqTest.java.sav

  • From: kchung@...
  • To: commits@...
  • Subject: [el-spec commits] [el-spec~source-code:40] Remove LinqTest.java.sav
  • Date: Tue, 17 Jan 2012 18:14:39 +0000

Project:    el-spec
Repository: source-code
Revision:   40
Author:     kchung
Date:       2012-01-17 18:14:38 UTC
Link:       

Log Message:
------------
Remove LinqTest.java.sav




Revisions:
----------
40


Diffs:
------
Index: trunk/impl/src/test/java/org/glassfish/el/test/LinqTest.java.sav
===================================================================
--- trunk/impl/src/test/java/org/glassfish/el/test/LinqTest.java.sav    
(revision 39)
+++ trunk/impl/src/test/java/org/glassfish/el/test/LinqTest.java.sav    
(revision 40)
@@ -1,101 +0,0 @@
-package org.glassfish.el.test;
-
-import java.util.List;
-
-import org.junit.Test;
-import org.junit.Before;
-import org.junit.BeforeClass;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-import javax.el.ELProcessor;
-
-public class LinqTest {
-
-    ELProcessor elp;
-    Object ret;
-
-    @Before
-    public void setUP() {
-        Manager manager = Manager.getManager();
-        manager.setupDB();
-        elp = manager.getElp();
-    }
-
-    void p(String msg) {
-        System.out.println(msg);
-    }
-
-    static int v[] = {200, 203, 204};
-
-    @Test
-    public void testWhere() {
-        p("** Query ** products.where(p->p.unitPrice >= 10)");
-        ret = elp.getValue("products.where(p->p.unitPrice >= 10)");
-        assertTrue(Iterable.class.isInstance(ret));
-        int indx = 0;
-        for (Object item: (Iterable) ret) {
-            p(item.toString());
-            assertTrue(((Product)item).getProductID() == v[indx++]);
-        }
-    }
-
-    static String pnames[] = {"Eagle", "Coming Home", "Greatest Hits",
-                       "History of Golf", "Toy Story" };
-    @Test
-    public void testSelect() {
-        p("** Query ** products.select(p->p.name)");
-        ret = elp.getValue("products.select(p->p.name)");
-        int indx = 0;
-        for (Object item: (Iterable) ret) {
-            p(item.toString());
-            assertTrue(pnames[indx++].equals(item));
-        }
-    }
-
-    static String p2names[] = {"Eagle", "History of Golf", "Toy Story"};
-    static double p2price[] = {12.5, 11.0, 10.0};
-    @Test
-    public void testSelect2() {
-        p("** Query ** products.where(p->p.unitPrice >= 10)");
-        p("                    .select(p->[p.name, p.unitPrice])");
-        ret = elp.getValue("products.where(p->p.unitPrice >= 10)" +
-                                   ".select(p->[p.name,p.unitPrice])");
-        int indx = 0;
-        for (Object item: (Iterable) ret) {
-            p(item.toString());
-            assertTrue(List.class.isInstance(item));
-            assertEquals(((List)item).get(0), p2names[indx]);
-            assertTrue(((List)item).get(1).equals(p2price[indx++]));
-        }
-    }
-
-    static int i3[] = {0, 3, 4};
-    @Test
-    public void testSelect3() {
-        p("** Query ** products.select((p,i)->{'product':p,'index':i}).");
-        p("                     where(p->p.product.unitPrice >= 10).");
-        p("                     select(p->p.index)");
-        ret = elp.getValue("products.select((p,i)->{'product':p, 
'index':i})." +
-                                    "where(p->p.product.unitPrice >= 10)." +
-                                    "select(p->p.index)");
-        int indx = 0;
-        for (Object item: (Iterable) ret) {
-            p(item.toString());
-            assertTrue(item.equals(i3[indx++]));
-        }
-    }
-
-    @Test
-    public void testSelectMany2() {
-        p("** Query ** customers.where(c->c.country == 'USA').");
-        p("                      selectMany(c->orders, 
(c,o)->{'o':o,'c':c}).");
-        p("                      where(co->co.o.orderData.year == 2011)");
-        ret = elp.getValue("customers.where(c->c.country == 'USA')." +
-                                     "selectMany(c->c.orders)");
-        for (Object item: (Iterable) ret) {
-            p(item.toString());
-        }
-    }
-}
-





[el-spec commits] [el-spec~source-code:40] Remove LinqTest.java.sav

kchung 01/17/2012
 
 
Close
loading
Please Confirm
Close