forked from matomo-org/matomo-java-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPiwikDateTest.java
More file actions
73 lines (58 loc) · 1.51 KB
/
PiwikDateTest.java
File metadata and controls
73 lines (58 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
* Piwik Java Tracker
*
* @link https://github.com/piwik/piwik-java-tracker
* @license https://github.com/piwik/piwik-java-tracker/blob/master/LICENSE BSD-3 Clause
*/
package org.piwik.java.tracking;
import java.util.TimeZone;
import org.junit.After;
import org.junit.AfterClass;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
/**
*
* @author brettcsorba
*/
public class PiwikDateTest{
public PiwikDateTest(){
}
@BeforeClass
public static void setUpClass(){
}
@AfterClass
public static void tearDownClass(){
}
@Before
public void setUp(){
}
@After
public void tearDown(){
}
/**
* Test of constructor, of class PiwikDate.
*/
@Test
public void testConstructor0(){
PiwikDate date = new PiwikDate();
assertNotNull(date);
}
@Test
public void testConstructor1(){
PiwikDate date = new PiwikDate(1433186085092L);
assertNotNull(date);
assertEquals("2015-06-01 07:14:45", date.toString());
}
/**
* Test of setTimeZone method, of class PiwikDate.
*/
@Test
public void testSetTimeZone(){
PiwikDate date = new PiwikDate(1433186085092L);
date.setTimeZone(TimeZone.getTimeZone("America/New_York"));
assertEquals("2015-06-01 03:14:45", date.toString());
}
}