コード例 #1
0
ファイル: DateTest.java プロジェクト: kamil555/Deliverable3
 /**
  * Test method for {@link Main.Date#setMonth(int)}.
  *
  * @throws ParseException
  */
 @Test
 public void testSetMonth() throws ParseException {
   d.setMonth(1);
   assertEquals(d.getMonth(), 1);
 }
コード例 #2
0
ファイル: DateTest.java プロジェクト: kamil555/Deliverable3
 /**
  * Test method for {@link Main.Date#getMinutes()}.
  *
  * @throws ParseException
  */
 @Test
 public void testGetMinutes() throws ParseException {
   assertEquals(d.getMinutes(), 30);
 }
コード例 #3
0
ファイル: DateTest.java プロジェクト: kamil555/Deliverable3
 /**
  * Test method for {@link Main.Date#getSeconds()}.
  *
  * @throws ParseException
  */
 @Test
 public void testGetSeconds() throws ParseException {
   assertEquals(d.getSeconds(), 0);
 }
コード例 #4
0
ファイル: DateTest.java プロジェクト: kamil555/Deliverable3
 /**
  * Test method for {@link Main.Date#getYear()}.
  *
  * @throws ParseException
  */
 @Test
 public void testGetYear() throws ParseException {
   assertEquals(d.getYear(), 2015);
 }
コード例 #5
0
ファイル: DateTest.java プロジェクト: kamil555/Deliverable3
 /**
  * Test method for {@link Main.Date#getHour()}.
  *
  * @throws ParseException
  */
 @Test
 public void testGetHour() throws ParseException {
   assertEquals(d.getHour(), 8);
 }
コード例 #6
0
ファイル: DateTest.java プロジェクト: kamil555/Deliverable3
 /**
  * Test method for {@link Main.Date#getMonth()}.
  *
  * @throws ParseException
  */
 @Test
 public void testGetMonth() throws ParseException {
   assertEquals(d.getMonth(), 12);
 }
コード例 #7
0
ファイル: DateTest.java プロジェクト: kamil555/Deliverable3
 /**
  * Test method for {@link Main.Date#getDay()}.
  *
  * @throws ParseException
  */
 @Test
 public void testGetDay() throws ParseException {
   assertEquals(d.getDay(), 25);
 }
コード例 #8
0
ファイル: DateTest.java プロジェクト: kamil555/Deliverable3
 /**
  * Test method for {@link Main.Date#addDays(int)}.
  *
  * @throws ParseException
  */
 @Test
 public void testAddDays() throws ParseException {
   d.addDays(1);
   assertEquals(d.getDay(), 26);
 }
コード例 #9
0
ファイル: DateTest.java プロジェクト: kamil555/Deliverable3
 /**
  * Test method for {@link Main.Date#addHours(int)}.
  *
  * @throws ParseException
  */
 @Test
 public void testAddHours() throws ParseException {
   d.addHours(2);
   assertEquals(d.getHour(), 10);
 }
コード例 #10
0
ファイル: DateTest.java プロジェクト: kamil555/Deliverable3
 /**
  * Test method for {@link Main.Date#getDiffDay(Main.Date)}.
  *
  * @throws ParseException
  */
 @Test
 public void testGetDiffDay() throws ParseException {
   assertEquals(d.getDiffDay(d2), 1);
 }
コード例 #11
0
ファイル: DateTest.java プロジェクト: kamil555/Deliverable3
 /**
  * Test method for {@link Main.Date#before(Main.Date)}.
  *
  * @throws ParseException
  */
 @Test
 public void testBefore() throws ParseException {
   assertTrue(d.before(d2));
 }
コード例 #12
0
ファイル: DateTest.java プロジェクト: kamil555/Deliverable3
 /**
  * Test method for {@link Main.Date#getDiffHours(Main.Date)}.
  *
  * @throws ParseException
  */
 @Test
 public void testGetDiffHours() throws ParseException {
   assertEquals(d.getDiffHours(d2), 24);
 }
コード例 #13
0
ファイル: DateTest.java プロジェクト: kamil555/Deliverable3
 /**
  * Test method for {@link Main.Date#setSeconds(int)}.
  *
  * @throws ParseException
  */
 @Test
 public void testSetSeconds() throws ParseException {
   d.setSeconds(30);
   ;
   assertEquals(d.getSeconds(), 30);
 }
コード例 #14
0
ファイル: DateTest.java プロジェクト: kamil555/Deliverable3
 /**
  * Test method for {@link Main.Date#setMinutes(int)}.
  *
  * @throws ParseException
  */
 @Test
 public void testSetMinutes() throws ParseException {
   d.setMinutes(45);
   assertEquals(d.getMinutes(), 45);
 }
コード例 #15
0
ファイル: DateTest.java プロジェクト: kamil555/Deliverable3
 /**
  * Test method for {@link Main.Date#setHour(int)}.
  *
  * @throws ParseException
  */
 @Test
 public void testSetHour() throws ParseException {
   d.setHour(0);
   ;
   assertEquals(d.getHour(), 0);
 }
コード例 #16
0
ファイル: DateTest.java プロジェクト: kamil555/Deliverable3
 /**
  * Test method for {@link Main.Date#setYear(int)}.
  *
  * @throws ParseException
  */
 @Test
 public void testSetYear() throws ParseException {
   d.setYear(2016);
   ;
   assertEquals(d.getYear(), 2016);
 }