Package com.googlecode.aviator.runtime.function.system

Source Code of com.googlecode.aviator.runtime.function.system.SysDateFunctionUnitTest

package com.googlecode.aviator.runtime.function.system;

import static org.junit.Assert.*;

import java.util.Date;

import org.junit.Test;

import com.googlecode.aviator.runtime.function.system.SysDateFunction;
import com.googlecode.aviator.runtime.type.AviatorBoolean;
import com.googlecode.aviator.runtime.type.AviatorObject;


public class SysDateFunctionUnitTest {
    @Test
    public void testCall() {
        SysDateFunction fun = new SysDateFunction();

        AviatorObject result = fun.call(null);
        assertNotNull(result);
        assertTrue(result.getValue(null) instanceof Date);
    }


    @Test(expected = IllegalArgumentException.class)
    public void hasArugment() {
        SysDateFunction fun = new SysDateFunction();
        fun.call(null, AviatorBoolean.TRUE);

    }
}
TOP

Related Classes of com.googlecode.aviator.runtime.function.system.SysDateFunctionUnitTest

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.