@Test public void test_update_with_page() throws Exception { SFormMapping formMapping = createFormMapping(ID); formMappingService.update(formMapping, null, PAGE_ID); verify(recorder).recordUpdate(updateRecordCaptor.capture(), updateEventCaptor.capture()); assertThat(updateRecordCaptor.getValue().getFields()) .contains( entry("target", SFormMapping.TARGET_INTERNAL), entry("pageMapping.url", null), entry("pageMapping.pageId", PAGE_ID), entry("pageMapping.urlAdapter", null)); }
@Test(expected = SObjectModificationException.class) public void test_update_with_invalid_parameters3() throws Exception { SFormMapping formMapping = createFormMapping(ID); formMappingService.update(formMapping, "", null); }
@Test(expected = SObjectModificationException.class) public void test_update_with_page_that_does_not_exists() throws Exception { SFormMapping formMapping = createFormMapping(ID); formMappingService.update(formMapping, null, 557441l); }