use of org.datatransferproject.transfer.microsoft.helper.TestTransformerContext in project data-transfer-project by google.
the class ToCalendarAttendeeModelTransformerTest method testTransform.
@Test
public void testTransform() {
Map<String, Object> attendeeMap = new HashMap<>();
attendeeMap.put("type", "required");
Map<String, String> addressMap = new HashMap<>();
addressMap.put("name", "Test Test1");
addressMap.put("address", "foo@foo.com");
attendeeMap.put("emailAddress", addressMap);
CalendarAttendeeModel attendee = transformer.apply(attendeeMap, new TestTransformerContext());
Assert.assertFalse(attendee.getOptional());
Assert.assertEquals("Test Test1", attendee.getDisplayName());
Assert.assertEquals("foo@foo.com", attendee.getEmail());
}
use of org.datatransferproject.transfer.microsoft.helper.TestTransformerContext in project data-transfer-project by google.
the class ToCalendarEventTimeTransformerTest method testTransform.
@Test
public void testTransform() {
Map<String, String> map = new HashMap<>();
map.put("dateTime", "2018-02-14T18:00:00.0000000");
map.put("timeZone", "UTC");
CalendarEventModel.CalendarEventTime time = transformer.apply(map, new TestTransformerContext());
Assert.assertEquals(18, time.getDateTime().getHour());
Assert.assertEquals(2018, time.getDateTime().getYear());
Assert.assertEquals(14, time.getDateTime().getDayOfMonth());
}
use of org.datatransferproject.transfer.microsoft.helper.TestTransformerContext in project data-transfer-project by google.
the class ToCalendarEventModelTransformerTest method setUp.
@Before
public void setUp() {
transformer = new ToCalendarEventModelTransformer();
mapper = new ObjectMapper();
context = new TestTransformerContext();
}
use of org.datatransferproject.transfer.microsoft.helper.TestTransformerContext in project data-transfer-project by google.
the class ToCalendarModelTransformerTest method setUp.
@Before
public void setUp() {
transformer = new ToCalendarModelTransformer();
mapper = new ObjectMapper();
context = new TestTransformerContext();
}
Aggregations