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