Package co.nubetech.crux.view

Source Code of co.nubetech.crux.view.TestFunctionView

package co.nubetech.crux.view;

import static org.junit.Assert.assertEquals;

import org.junit.Test;

import co.nubetech.crux.model.Datastore;
import co.nubetech.crux.model.Function;
import co.nubetech.crux.model.ValueType;

public class TestFunctionView {
 
  @Test
  public void testFunctionView(){
    Datastore dataStore = new Datastore();
    dataStore.setId(1212);
    dataStore.setName("DataStore");
   
    ValueType valueType = new ValueType(1,dataStore,"Type","class2",
        "className1", true);
    ValueType returnValueType = new ValueType(2,dataStore,"ReturnType","class3",
        "className1", false);
   
   
    Function function = new Function();
    function.setId(12345);
    function.setFunctionName("fun");
    function.setFunctionClass("class1");
    function.setAggregate(false);
    function.setValueType(valueType);
    function.setReturnValueType(returnValueType);
                                                        
    FunctionView functionView = new FunctionView(function);
   
    assertEquals(functionView.getFunctionName(),"fun");
    assertEquals(functionView.getValueType(),"Type");
    assertEquals(functionView.getReturnType(),"ReturnType");
   
  }

}
TOP

Related Classes of co.nubetech.crux.view.TestFunctionView

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.