[kune-commits] r1309 - in trunk/src: main/java/cc/kune/common/client/tooltip test/java/cc/kune/common/client/tooltip

Vicente J. Ruiz Jurado vjrj_ at ourproject.org
Wed Apr 13 10:57:32 CEST 2011


Author: vjrj_
Date: 2011-04-13 10:57:31 +0200 (Wed, 13 Apr 2011)
New Revision: 1309

Added:
   trunk/src/test/java/cc/kune/common/client/tooltip/TooltipTimersTest.java
Removed:
   trunk/src/main/java/cc/kune/common/client/tooltip/TooltipTimersTest.java
Log:
CLOSED - # 37: Implement a GWT Tooltip widget similar to qtip or others 
http://kune.ourproject.org/issues/ticket/37

Deleted: trunk/src/main/java/cc/kune/common/client/tooltip/TooltipTimersTest.java
===================================================================
--- trunk/src/main/java/cc/kune/common/client/tooltip/TooltipTimersTest.java	2011-04-13 08:48:35 UTC (rev 1308)
+++ trunk/src/main/java/cc/kune/common/client/tooltip/TooltipTimersTest.java	2011-04-13 08:57:31 UTC (rev 1309)
@@ -1,104 +0,0 @@
-package cc.kune.common.client.tooltip;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mockito;
-import org.mockito.invocation.InvocationOnMock;
-import org.mockito.stubbing.Answer;
-
-import cc.kune.common.client.utils.TimerWrapper;
-
-public class TooltipTimersTest {
-    private TimerWrapper hideTimer;
-    protected boolean hideTimerScheduled = false;
-    private TimerWrapper showTimer;
-    protected boolean showTimerScheduled = false;
-    private TooltipTimers timers;
-
-    @Before
-    public void before() {
-        showTimer = Mockito.mock(TimerWrapper.class);
-        hideTimer = Mockito.mock(TimerWrapper.class);
-        timers = new TooltipTimers(showTimer, hideTimer);
-        Mockito.doAnswer(new Answer<Object>() {
-            @Override
-            public Object answer(final InvocationOnMock invocation) throws Throwable {
-                showTimerScheduled = true;
-                return null;
-            }
-        }).when(showTimer).schedule(Mockito.anyInt());
-        Mockito.doAnswer(new Answer<Object>() {
-
-            @Override
-            public Object answer(final InvocationOnMock invocation) throws Throwable {
-                return showTimerScheduled;
-            }
-        }).when(showTimer).isScheduled();
-        Mockito.doAnswer(new Answer<Object>() {
-
-            @Override
-            public Object answer(final InvocationOnMock invocation) throws Throwable {
-                showTimerScheduled = false;
-                return null;
-            }
-        }).when(showTimer).cancel();
-        Mockito.doAnswer(new Answer<Object>() {
-            @Override
-            public Object answer(final InvocationOnMock invocation) throws Throwable {
-                hideTimerScheduled = true;
-                return null;
-            }
-        }).when(hideTimer).schedule(Mockito.anyInt());
-        Mockito.doAnswer(new Answer<Object>() {
-
-            @Override
-            public Object answer(final InvocationOnMock invocation) throws Throwable {
-                return hideTimerScheduled;
-            }
-        }).when(hideTimer).isScheduled();
-        Mockito.doAnswer(new Answer<Object>() {
-
-            @Override
-            public Object answer(final InvocationOnMock invocation) throws Throwable {
-                hideTimerScheduled = false;
-                return null;
-            }
-        }).when(hideTimer).cancel();
-    }
-
-    @Test
-    public void testSeveralOverAndOutsOnlyOneTimerEach() {
-        timers.onOver();
-        timers.onOver();
-        timers.onOver();
-        timers.onOut();
-        timers.onOut();
-        Mockito.verify(showTimer, Mockito.times(1)).schedule(Mockito.anyInt());
-        Mockito.verify(showTimer, Mockito.times(1)).cancel();
-        Mockito.verify(hideTimer, Mockito.times(1)).schedule(Mockito.anyInt());
-    }
-
-    @Test
-    public void testSeveralOverOnlyOneTimer() {
-        timers.onOver();
-        timers.onOver();
-        Mockito.verify(showTimer, Mockito.times(1)).schedule(Mockito.anyInt());
-        Mockito.verify(hideTimer, Mockito.times(0)).cancel();
-    }
-
-    @Test
-    public void testSeveralOverOutsAndOverOnlyOneTimerEach() {
-        timers.onOver();
-        timers.onOver();
-        timers.onOver();
-        timers.onOut();
-        timers.onOut();
-        timers.onOver();
-        timers.onOver();
-        timers.onOver();
-        Mockito.verify(showTimer, Mockito.times(2)).schedule(Mockito.anyInt());
-        Mockito.verify(showTimer, Mockito.times(1)).cancel();
-        Mockito.verify(hideTimer, Mockito.times(1)).schedule(Mockito.anyInt());
-        Mockito.verify(hideTimer, Mockito.times(1)).cancel();
-    }
-}

Copied: trunk/src/test/java/cc/kune/common/client/tooltip/TooltipTimersTest.java (from rev 1308, trunk/src/main/java/cc/kune/common/client/tooltip/TooltipTimersTest.java)
===================================================================
--- trunk/src/test/java/cc/kune/common/client/tooltip/TooltipTimersTest.java	                        (rev 0)
+++ trunk/src/test/java/cc/kune/common/client/tooltip/TooltipTimersTest.java	2011-04-13 08:57:31 UTC (rev 1309)
@@ -0,0 +1,104 @@
+package cc.kune.common.client.tooltip;
+
+import org.junit.Before;
+import org.junit.Test;
+import org.mockito.Mockito;
+import org.mockito.invocation.InvocationOnMock;
+import org.mockito.stubbing.Answer;
+
+import cc.kune.common.client.utils.TimerWrapper;
+
+public class TooltipTimersTest {
+    private TimerWrapper hideTimer;
+    protected boolean hideTimerScheduled = false;
+    private TimerWrapper showTimer;
+    protected boolean showTimerScheduled = false;
+    private TooltipTimers timers;
+
+    @Before
+    public void before() {
+        showTimer = Mockito.mock(TimerWrapper.class);
+        hideTimer = Mockito.mock(TimerWrapper.class);
+        timers = new TooltipTimers(showTimer, hideTimer);
+        Mockito.doAnswer(new Answer<Object>() {
+            @Override
+            public Object answer(final InvocationOnMock invocation) throws Throwable {
+                showTimerScheduled = true;
+                return null;
+            }
+        }).when(showTimer).schedule(Mockito.anyInt());
+        Mockito.doAnswer(new Answer<Object>() {
+
+            @Override
+            public Object answer(final InvocationOnMock invocation) throws Throwable {
+                return showTimerScheduled;
+            }
+        }).when(showTimer).isScheduled();
+        Mockito.doAnswer(new Answer<Object>() {
+
+            @Override
+            public Object answer(final InvocationOnMock invocation) throws Throwable {
+                showTimerScheduled = false;
+                return null;
+            }
+        }).when(showTimer).cancel();
+        Mockito.doAnswer(new Answer<Object>() {
+            @Override
+            public Object answer(final InvocationOnMock invocation) throws Throwable {
+                hideTimerScheduled = true;
+                return null;
+            }
+        }).when(hideTimer).schedule(Mockito.anyInt());
+        Mockito.doAnswer(new Answer<Object>() {
+
+            @Override
+            public Object answer(final InvocationOnMock invocation) throws Throwable {
+                return hideTimerScheduled;
+            }
+        }).when(hideTimer).isScheduled();
+        Mockito.doAnswer(new Answer<Object>() {
+
+            @Override
+            public Object answer(final InvocationOnMock invocation) throws Throwable {
+                hideTimerScheduled = false;
+                return null;
+            }
+        }).when(hideTimer).cancel();
+    }
+
+    @Test
+    public void testSeveralOverAndOutsOnlyOneTimerEach() {
+        timers.onOver();
+        timers.onOver();
+        timers.onOver();
+        timers.onOut();
+        timers.onOut();
+        Mockito.verify(showTimer, Mockito.times(1)).schedule(Mockito.anyInt());
+        Mockito.verify(showTimer, Mockito.times(1)).cancel();
+        Mockito.verify(hideTimer, Mockito.times(1)).schedule(Mockito.anyInt());
+    }
+
+    @Test
+    public void testSeveralOverOnlyOneTimer() {
+        timers.onOver();
+        timers.onOver();
+        Mockito.verify(showTimer, Mockito.times(1)).schedule(Mockito.anyInt());
+        Mockito.verify(hideTimer, Mockito.times(0)).cancel();
+    }
+
+    @Test
+    public void testSeveralOverOutsAndOverOnlyOneTimerEach() {
+        timers.onOver();
+        timers.onOver();
+        timers.onOver();
+        timers.onOut();
+        timers.onOut();
+        timers.onOver();
+        timers.onOver();
+        timers.onOver();
+        Mockito.verify(showTimer, Mockito.times(2)).schedule(Mockito.anyInt());
+        Mockito.verify(showTimer, Mockito.times(1)).cancel();
+        Mockito.verify(hideTimer, Mockito.times(1)).schedule(Mockito.anyInt());
+        Mockito.verify(hideTimer, Mockito.times(1)).cancel();
+    }
+}


Property changes on: trunk/src/test/java/cc/kune/common/client/tooltip/TooltipTimersTest.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain




More information about the kune-commits mailing list