Package net.sourceforge.fullsync.rules.filefilter.values

Examples of net.sourceforge.fullsync.rules.filefilter.values.DateValue.fromString()


*/
public class DateValueTest extends TestCase {

  public void testFromString() {
    DateValue value = new DateValue();
    value.fromString("10/08/1994");

    assertEquals(value.toString(), "10/08/1994");
  }

  public void testEquals() throws ParseException {
View Full Code Here


    assertEquals(value.toString(), "10/08/1994");
  }

  public void testEquals() throws ParseException {
    DateValue value = new DateValue();
    value.fromString("10/08/1994");

    SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
    Date date = dateFormat.parse("10/08/1994 10:00:00");
    assertTrue(value.equals(date.getTime()));
View Full Code Here

    assertTrue(!value.equals(date.getTime()));
  }

  public void testIsBefore() throws ParseException {
    DateValue value = new DateValue();
    value.fromString("10/08/1994");

    SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
    Date date = dateFormat.parse("11/08/1994 00:00:00");
    assertTrue(value.isBefore(date.getTime()));
View Full Code Here

    assertTrue(value.isBefore(date.getTime()));
  }

  public void testIsAfter() throws ParseException {
    DateValue value = new DateValue();
    value.fromString("10/08/1994");

    SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
    Date date = dateFormat.parse("09/08/1994 00:00:00");
    assertTrue(value.isAfter(date.getTime()));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.