You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@empire-db.apache.org by fr...@apache.org on 2009/01/03 13:41:33 UTC
svn commit: r730980 - in
/incubator/empire-db/branches/maven/empire-db/src/test: ./ java/ java/org/
java/org/apache/ java/org/apache/empire/ java/org/apache/empire/commons/
java/org/apache/empire/commons/DateUtilsTest.java
Author: francisdb
Date: Sat Jan 3 04:41:33 2009
New Revision: 730980
URL: http://svn.apache.org/viewvc?rev=730980&view=rev
Log:
added a first unit test
Added:
incubator/empire-db/branches/maven/empire-db/src/test/
incubator/empire-db/branches/maven/empire-db/src/test/java/
incubator/empire-db/branches/maven/empire-db/src/test/java/org/
incubator/empire-db/branches/maven/empire-db/src/test/java/org/apache/
incubator/empire-db/branches/maven/empire-db/src/test/java/org/apache/empire/
incubator/empire-db/branches/maven/empire-db/src/test/java/org/apache/empire/commons/
incubator/empire-db/branches/maven/empire-db/src/test/java/org/apache/empire/commons/DateUtilsTest.java
Added: incubator/empire-db/branches/maven/empire-db/src/test/java/org/apache/empire/commons/DateUtilsTest.java
URL: http://svn.apache.org/viewvc/incubator/empire-db/branches/maven/empire-db/src/test/java/org/apache/empire/commons/DateUtilsTest.java?rev=730980&view=auto
==============================================================================
--- incubator/empire-db/branches/maven/empire-db/src/test/java/org/apache/empire/commons/DateUtilsTest.java (added)
+++ incubator/empire-db/branches/maven/empire-db/src/test/java/org/apache/empire/commons/DateUtilsTest.java Sat Jan 3 04:41:33 2009
@@ -0,0 +1,44 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.empire.commons;
+
+import java.util.Calendar;
+import java.util.Date;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+/**
+ * @author francisdb
+ *
+ */
+public class DateUtilsTest
+{
+ @Test
+ public void testGetDateNow()
+ {
+ Date now = DateUtils.getDateNow();
+ Calendar cal = Calendar.getInstance();
+ cal.setTime(now);
+ Assert.assertEquals(0, cal.get(Calendar.HOUR));
+ Assert.assertEquals(0, cal.get(Calendar.MINUTE));
+ Assert.assertEquals(0, cal.get(Calendar.SECOND));
+ Assert.assertEquals(0, cal.get(Calendar.MILLISECOND));
+ }
+}