/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package kg.apc.jmeter.vizualizers;

import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author apc
 */
public class DateTimeRendererTest
{
   /**
    *
    */
   public DateTimeRendererTest()
   {
   }

   /**
    *
    * @throws Exception
    */
   @BeforeClass
   public static void setUpClass()
        throws Exception
   {
   }

   /**
    *
    * @throws Exception
    */
   @AfterClass
   public static void tearDownClass()
        throws Exception
   {
   }

   /**
    *
    */
   @Before
   public void setUp()
   {
   }

   /**
    *
    */
   @After
   public void tearDown()
   {
   }

   /**
    * Test of setValue method, of class DateTimeRenderer.
    */
   @Test
   public void testSetValue()
   {
      System.out.println("setValue");
      DateTimeRenderer instance = new DateTimeRenderer("HH:mm:ss");
      
      instance.setValue(null);
      assertEquals("", instance.getText());

      instance.setValue(1000000);
      String text = instance.getText();
      assertEquals("03:16:40", text);
   }


   /**
    *
    */
   @Test
   public void testConstructors()
   {
      DateTimeRenderer i1=new DateTimeRenderer();
      DateTimeRenderer i2=new DateTimeRenderer("HH");
   }
}

@@ -129,16 +129,43 @@
 izers;%0A%0A
+import java.util.Calendar;%0A
 import o
@@ -1065,16 +1065,220 @@
 mm:ss%22);
+%0A%0A      Calendar test = Calendar.getInstance();%0A%0A      test.set(Calendar.HOUR_OF_DAY, 3);%0A      test.set(Calendar.MINUTE, 16);%0A      test.set(Calendar.SECOND, 40);%0A      test.set(Calendar.MILLISECOND, 0);
 %0A      %0A
@@ -1381,15 +1381,30 @@
 lue(
-1000000
+test.getTimeInMillis()
 );%0A 

fix DateTimeRendererTest Timezone problem