001/** 002 * Copyright 2012 The Kuali Foundation 003 * 004 * Licensed under the the Educational Community License, Version 1.0 005 * (the "License"); you may not use this file except in compliance 006 * with the License. You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl1.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.student.common.test.util; 017 018import java.sql.Timestamp; 019import java.util.Date; 020 021import org.junit.Assert; 022 023/** 024 * @author ocleirig 025 * 026 */ 027public class TimeTester { 028 029 /** 030 * 031 */ 032 public TimeTester() { 033 } 034 035 public void check (Date expected, Date actual) { 036 if (expected == null && actual == null) { 037 return; 038 } 039 Assert.assertNotNull(expected); 040 Assert.assertNotNull(actual); 041 042 Timestamp ts1 = new Timestamp (expected.getTime()); 043 Timestamp ts2 = new Timestamp (actual.getTime()); 044 045 Assert.assertEquals(ts1, ts2); 046 047 048 } 049 050}