All Downloads are FREE. Search and download functionalities are using the official Maven repository.

templates.util.DateUtilTest.ftl Maven / Gradle / Ivy

Go to download

Maven plugin to generate Java classes from StoredProcedure and Functions in Database

There is a newer version: 1.8.20
Show newest version
package ${javaPackage}.util;

import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.runners.MockitoJUnitRunner;

@RunWith(MockitoJUnitRunner.class)
public class DateUtilTest {

    @Test
    public void testCreate() throws java.sql.SQLException {
        Assert.assertNotNull(new DateUtil());
    }

    @Test
    public void testInputNull() throws java.sql.SQLException {
        Assert.assertNull(DateUtil.process(null));
    }

    @Test
    public void testInputNotNull() throws java.sql.SQLException {
        java.util.Date date = new java.util.Date();
        java.util.Date result = DateUtil.process(date);
        Assert.assertNotNull(result);
        Assert.assertNotSame(date, result);
        Assert.assertEquals(date, result);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy