mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-09-28 18:49:56 +02:00
27 lines
592 B
Java
27 lines
592 B
Java
|
// SPDX-FileCopyrightText: 2018 Paul Schaub <vanitasvitae@fsfe.org>
|
||
|
//
|
||
|
// SPDX-License-Identifier: Apache-2.0
|
||
|
|
||
|
package investigations;
|
||
|
|
||
|
import org.junit.jupiter.api.Test;
|
||
|
|
||
|
import java.util.Date;
|
||
|
|
||
|
import static org.junit.JUtils.assertEquals;
|
||
|
|
||
|
/**
|
||
|
* Exploratory test for date and time related operations.
|
||
|
*/
|
||
|
public class TimeTest {
|
||
|
|
||
|
@Test
|
||
|
public void newDateGetTimeEqualsSystemCurrentTimeMillis() {
|
||
|
Date date = new Date();
|
||
|
long dateTime = date.getTime();
|
||
|
long currentTime = System.currentTimeMillis();
|
||
|
|
||
|
assertEquals(dateTime, currentTime, 10);
|
||
|
}
|
||
|
}
|