@@ -0,0 +1,2123 @@
+package org.odlabs.wiquery.ui.tabs;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport org.junit.Test;%0Aimport org.odlabs.wiquery.tester.WiQueryTestCase;%0Aimport org.slf4j.Logger;%0Aimport org.slf4j.LoggerFactory;%0A%0Apublic class TabsAnimateOptionTestCase extends WiQueryTestCase%0A%7B%0A%09protected static final Logger log = LoggerFactory.getLogger(TabsAnimateOptionTestCase.class);%0A%0A%09@Test%0A%09public void testGetJavaScriptOption()%0A%09%7B%0A%09%09TabsAnimateOption snap = new TabsAnimateOption(true);%0A%0A%09%09// Boolean param%0A%09%09String expectedJavascript = %22true%22;%0A%09%09String generatedJavascript = snap.getJavascriptOption().toString();%0A%0A%09%09log.info(expectedJavascript);%0A%09%09log.info(generatedJavascript);%0A%09%09assertEquals(generatedJavascript, expectedJavascript);%0A%0A%09%09// Integer param%0A%09%09snap.setIntegerParam(200);%0A%09%09expectedJavascript = %22200%22;%0A%09%09generatedJavascript = snap.getJavascriptOption().toString();%0A%09%09%0A%09%09log.info(expectedJavascript);%0A%09%09log.info(generatedJavascript);%0A%09%09assertEquals(generatedJavascript, expectedJavascript);%0A%09%09%0A%09%09// Literal param%0A%09%09snap.setLiteralParam(%22swing%22);%0A%09%09expectedJavascript = %22'swing'%22;%0A%09%09generatedJavascript = snap.getJavascriptOption().toString();%0A%0A%09%09log.info(expectedJavascript);%0A%09%09log.info(generatedJavascript);%0A%09%09assertEquals(generatedJavascript, expectedJavascript);%0A%09%09%0A%09%09// Object param%0A%09%09snap.setObjectParam(new TabsEffectOptionObject()%0A%09%09%09%09.setEasing(%22linear%22)%0A%09%09%09%09.setDelay(50)%0A%09%09%09%09.setDuration(200)%0A%09%09%09%09.setEffect(%22blind%22)%0A%09%09);%0A%09%09expectedJavascript = %22%7Beasing: 'linear', delay: 50, duration: 200, effect: 'blind'%7D%22;%0A%09%09generatedJavascript = snap.getJavascriptOption().toString();%0A%0A%09%09log.info(expectedJavascript);%0A%09%09log.info(generatedJavascript);%0A%09%09assertEquals(generatedJavascript, expectedJavascript);%0A%0A%09%09// Null param%0A%09%09snap.setLiteralParam(null);%0A%09%09try%0A%09%09%7B%0A%09%09%09generatedJavascript = snap.getJavascriptOption().toString();%0A%09%09%09assertTrue(false);%0A%09%09%7D%0A%09%09catch (Exception e)%0A%09%09%7B%0A%09%09%09// We have an expected error%0A%09%09%09assertEquals(%22The GenericAnimateOption must have one not null parameter%22, e.getMessage());%0A%09%09%7D%0A%09%7D%0A%0A%09@Override%0A%09protected Logger getLog()%0A%09%7B%0A%09%09return log;%0A%09%7D%0A%7D%0A

Add TabsAnimateOption test case