From e1e0bd2f6be983e58763e7665d65d88a398f1ec9 Mon Sep 17 00:00:00 2001 From: Manolo Carrasco Date: Mon, 14 Jun 2010 07:33:36 +0000 Subject: [PATCH] removed stuff committed by mistake --- .../gwt/query/client/JreQueryCoreTest.java | 185 ------------------ 1 file changed, 185 deletions(-) diff --git a/gwtquery-core/src/test/java/com/google/gwt/query/client/JreQueryCoreTest.java b/gwtquery-core/src/test/java/com/google/gwt/query/client/JreQueryCoreTest.java index a8f93a91..bf6c5b0e 100644 --- a/gwtquery-core/src/test/java/com/google/gwt/query/client/JreQueryCoreTest.java +++ b/gwtquery-core/src/test/java/com/google/gwt/query/client/JreQueryCoreTest.java @@ -61,190 +61,5 @@ public class JreQueryCoreTest extends GWTTestCase { assertEquals("({border:'1px solid black'})", Properties .wrapPropertiesString("({border:'1px solid black'})")); } - public void test() throws NamingException { - System.out.println( MockInitialContextFactory.class.getName()); - System.setProperty("java.naming.factory.initial", MockInitialContextFactory.class.getName()); - Context mockCtx = new MockContext(); -// UserTransaction mockTrans = createMock(UserTransaction.class); -// expect(mockCtx.lookup("UserTransaction")).andReturn(mockTrans); -// replay(mockCtx); - MockInitialContextFactory.setMockContext(mockCtx); - - Context ctx = new InitialContext(); - ctx.lookup("whatever"); - - } - public static class MockInitialContextFactory implements - InitialContextFactory { - private static Context mockCtx = null; - - public static void setMockContext(Context ctx) { - mockCtx = ctx; - } - - public Context getInitialContext(java.util.Hashtable environment) - throws NamingException { - if (mockCtx == null) { - throw new IllegalStateException("mock context was not set."); - } - return mockCtx; - } - } - public static class MockContext implements Context { - - public Object addToEnvironment(String propName, Object propVal) - throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public void bind(Name name, Object obj) throws NamingException { - // TODO Auto-generated method stub - - } - - public void bind(String name, Object obj) throws NamingException { - // TODO Auto-generated method stub - - } - - public void close() throws NamingException { - // TODO Auto-generated method stub - - } - - public Name composeName(Name name, Name prefix) throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public String composeName(String name, String prefix) - throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public Context createSubcontext(Name name) throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public Context createSubcontext(String name) throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public void destroySubcontext(Name name) throws NamingException { - // TODO Auto-generated method stub - - } - - public void destroySubcontext(String name) throws NamingException { - // TODO Auto-generated method stub - - } - - public Hashtable getEnvironment() throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public String getNameInNamespace() throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public NameParser getNameParser(Name name) throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public NameParser getNameParser(String name) throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public NamingEnumeration list(Name name) - throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public NamingEnumeration list(String name) - throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public NamingEnumeration listBindings(Name name) - throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public NamingEnumeration listBindings(String name) - throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public Object lookup(Name name) throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public Object lookup(String name) throws NamingException { - System.out.println("lookup " + name); - return null; - } - - public Object lookupLink(Name name) throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public Object lookupLink(String name) throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public void rebind(Name name, Object obj) throws NamingException { - // TODO Auto-generated method stub - - } - - public void rebind(String name, Object obj) throws NamingException { - // TODO Auto-generated method stub - - } - - public Object removeFromEnvironment(String propName) throws NamingException { - // TODO Auto-generated method stub - return null; - } - - public void rename(Name oldName, Name newName) throws NamingException { - // TODO Auto-generated method stub - - } - - public void rename(String oldName, String newName) throws NamingException { - // TODO Auto-generated method stub - - } - - public void unbind(Name name) throws NamingException { - // TODO Auto-generated method stub - - } - - public void unbind(String name) throws NamingException { - // TODO Auto-generated method stub - - } - - } - - } -- 2.39.5