Skip to content

Commit 5cd1445

Browse files
committed
add clock class test
1 parent 5e9cdf4 commit 5cd1445

1 file changed

Lines changed: 24 additions & 0 deletions

File tree

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package com.auth0.jwt;
2+
3+
import org.junit.Test;
4+
5+
import java.util.Date;
6+
7+
import static org.hamcrest.Matchers.equalTo;
8+
import static org.hamcrest.Matchers.is;
9+
import static org.hamcrest.Matchers.notNullValue;
10+
import static org.junit.Assert.*;
11+
12+
public class ClockTest {
13+
14+
@Test
15+
public void shouldGetToday() throws Exception{
16+
Clock clock = new Clock();
17+
Date clockToday = clock.getToday();
18+
Date today = new Date();
19+
20+
assertThat(clockToday, is(notNullValue()));
21+
assertThat(clockToday.getTime(), is(equalTo(today.getTime())));
22+
}
23+
24+
}

0 commit comments

Comments
 (0)