Package org.eclipse.sapphire.modeling.el

Examples of org.eclipse.sapphire.modeling.el.FunctionContext


    {
        if( this.visibilityFunctionResult == null )
        {
            if( this.visibilityFunctionInitializing )
            {
                this.visibilityFunctionResult = Literal.FALSE.evaluate( new FunctionContext() );
            }
            else
            {
                this.visibilityFunctionInitializing = true;
               
View Full Code Here


{
    @Test
   
    public void testWithArray()
    {
        FunctionContext context;
       
        context = new TestFunctionContext( new Object[] {} );
        testForExpectedValue( context, "${ Max( Collection ) }", null );

        context = new TestFunctionContext( new Object[] { "1" } );
View Full Code Here

{
    @Test
   
    public void testEmpty()
    {
        testForExpectedValue( new FunctionContext(), "${ List() }", list() );
    }
View Full Code Here

   
    @Test
   
    public void testSingleton()
    {
        testForExpectedValue( new FunctionContext(), "${ List( 'x' ) }", list( "x" ) );
    }
View Full Code Here

   
    @Test
   
    public void testWithList()
    {
        FunctionContext context;
       
        context = new TestFunctionContext( list() );
        testForExpectedValue( context, "${ Max( Collection ) }", null );

        context = new TestFunctionContext( list( "1" ) );
View Full Code Here

   
    @Test
   
    public void testWithSet()
    {
        FunctionContext context;
       
        context = new TestFunctionContext( set() );
        testForExpectedValue( context, "${ Max( Collection ) }", null );

        context = new TestFunctionContext( set( "1" ) );
View Full Code Here

   
    @Test
   
    public void testMultiple()
    {
        testForExpectedValue( new FunctionContext(), "${ List( 'x', 'y', 'z' ) }", list( "x", "y", "z" ) );
    }
View Full Code Here

    @Test
    @SuppressWarnings( "unchecked" )
   
    public void testVaried()
    {
        testForExpectedValue( new FunctionContext(), "${ List( 'x', 123, 123.456 ) }", list( "x", new BigInteger( "123" ), new BigDecimal( "123.456" ) ) );
    }
View Full Code Here

    public void testWithModelElementList()
    {
        final TestModelRoot root = TestModelRoot.TYPE.instantiate();
        final ElementList<TestModelElementA> list = root.getList1();
        final FunctionContext context = new ModelElementFunctionContext( root );
       
        TestModelElementA a;
       
        testForExpectedValue( context, "${ Max( List1 ) }", null );
        testForExpectedValue( context, "${ Max( List1, 'Value1' ) }", null );
View Full Code Here

{
    @Test
   
    public void testWithArray()
    {
        FunctionContext context;
       
        context = new TestFunctionContext( new Object[] {} );
        testForExpectedValue( context, "${ Sum( Collection ) }", new BigDecimal( "0" ) );

        context = new TestFunctionContext( new Object[] { "1" } );
View Full Code Here

TOP

Related Classes of org.eclipse.sapphire.modeling.el.FunctionContext

Copyright © 2018 www.massapicom. 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.