Skip to content

Commit

Permalink
#80
Browse files Browse the repository at this point in the history
  • Loading branch information
justinhrobbins committed Jan 9, 2014
1 parent 6e47063 commit 03ff3d5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
public class DtoUtil {
static final Logger logger = LoggerFactory.getLogger(DtoUtil.class);

private DtoUtil(){};

public static void filterFields(Object obj, Set<String> fields) throws ServiceException {
if (CollectionUtils.isEmpty(fields)) {
return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import org.junit.experimental.categories.Category;
import org.robbins.tests.BaseMockingTest;
import org.robbins.tests.UnitTest;
import org.springframework.data.mapping.model.MappingException;

@Category(UnitTest.class)
public class DateTimeConverterUT extends BaseMockingTest {
Expand All @@ -28,7 +29,12 @@ public void before() {
public void convert_SourceFieldValueIsNull() {
Object result = dateTimeConverter.convert(null, null, null, null);

assertThat(result, is(nullValue()));
assertThat(result, is(nullValue()));
}

@Test(expected = MappingException.class)
public void convert_ThrowsMappingException() {
dateTimeConverter.convert(null, new String("test"), null, null);
}

@Test
Expand Down

0 comments on commit 03ff3d5

Please sign in to comment.