コード例 #1
0
 @Test
 public void isResponsibleForLocalTime() {
   Assert.assertThat(converter.getResponsibleFor(), Matchers.typeCompatibleWith(LocalTime.class));
 }
コード例 #2
0
 @Test
 public void convertOfValidTime_should_returnString() {
   final LocalTime localTime = new LocalTime(1, 2, 3, 4);
   assertThat(converter.convert(localTime), is("01:02:03"));
 }
コード例 #3
0
 @Test(expected = IllegalArgumentException.class)
 public void convertAnotherClass_should_fail() {
   converter.convert(new Object());
 }
コード例 #4
0
 @Test(expected = IllegalArgumentException.class)
 public void convertNull_should_fail() {
   converter.convert(null);
 }