forked from microsoftgraph/msgraph-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTimeOfDayTests.java
More file actions
41 lines (32 loc) · 1.11 KB
/
Copy pathTimeOfDayTests.java
File metadata and controls
41 lines (32 loc) · 1.11 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
package com.microsoft.graph.serializer;
import static org.junit.Assert.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import com.microsoft.graph.models.extensions.TimeOfDay;
public class TimeOfDayTests {
@Test
public void testTimeOfDaySerializer() throws Exception {
String strDate = TimeOfDay.parse("12:30:44").toString();
assertEquals("12:30:44", strDate);
}
@Test
public void testTimeOfDaySerializerIndefinite() throws Exception {
String strDate = TimeOfDay.parse("01:01:01").toString();
assertEquals("01:01:01", strDate);
}
@Test
public void testTimeOfDayDeserializer() throws Exception {
TimeOfDay time = TimeOfDay.parse("12:30:44");
assertEquals(12, time.getHour());
assertEquals(30, time.getMinute());
assertEquals(44, time.getSecond());
}
@Test
public void testTimeOfDayDeserializerIndefinite() throws Exception{
TimeOfDay time = TimeOfDay.parse("01:01:01");
assertEquals(1, time.getHour());
assertEquals(1, time.getMinute());
assertEquals(1, time.getSecond());
}
}