Package org.eclipse.sapphire.modeling.el

Examples of org.eclipse.sapphire.modeling.el.FunctionResult.status()


        {
            final FunctionResult result = ExpressionLanguageParser.parse( expr ).evaluate( context );
           
            try
            {
                final Status status = result.status();
                assertEquals( Status.Severity.ERROR, status.severity() );
                assertEquals( expected, status.message() );
            }
            finally
            {
View Full Code Here


       
        final FunctionResult fr = ExpressionLanguageParser.parse( "${ Validation( null ) }" ).evaluate( context );
       
        try
        {
            final Status st = fr.status();
           
            assertEquals( Status.Severity.ERROR, st.severity() );
            assertEquals( "Function Validation does not accept nulls in position 0.", st.message() );
        }
        finally
View Full Code Here

       
        final FunctionResult fr = ExpressionLanguageParser.parse( "${ Validation( 'abc' ) }" ).evaluate( context );
       
        try
        {
            final Status st = fr.status();
           
            assertEquals( Status.Severity.ERROR, st.severity() );
            assertEquals( "Function Validation( java.lang.String ) is undefined.", st.message() );
        }
        finally
View Full Code Here

       
        final FunctionResult fr = ExpressionLanguageParser.parse( "${ Size( null ) }" ).evaluate( context );
       
        try
        {
            final Status st = fr.status();
           
            assertEquals( Status.Severity.ERROR, st.severity() );
            assertEquals( "Function Size does not accept nulls in position 0.", st.message() );
        }
        finally
View Full Code Here

       
        final FunctionResult fr = ExpressionLanguageParser.parse( "${ Size( 3 ) }" ).evaluate( context );
       
        try
        {
            final Status st = fr.status();
           
            assertEquals( Status.Severity.ERROR, st.severity() );
            assertEquals( "Function Size cannot be applied to a java.math.BigInteger object.", st.message() );
        }
        finally
View Full Code Here

            final FunctionContext context = new ModelElementFunctionContext( element );
            final FunctionResult fr = ExpressionLanguageParser.parse( "${ This.Index }" ).evaluate( context );
           
            try
            {
                final Status st = fr.status();
               
                assertEquals( Status.Severity.ERROR, st.severity() );
                assertEquals( "Cannot determine index if parent is not a list.", st.message() );
            }
            finally
View Full Code Here

            final FunctionContext context = new ModelElementFunctionContext( child );
            final FunctionResult fr = ExpressionLanguageParser.parse( "${ This.Index }" ).evaluate( context );
           
            try
            {
                final Status st = fr.status();
               
                assertEquals( Status.Severity.ERROR, st.severity() );
                assertEquals( "Cannot determine index if parent is not a list.", st.message() );
            }
            finally
View Full Code Here

       
        final FunctionResult fr = ExpressionLanguageParser.parse( "${ Message( null ) }" ).evaluate( context );
       
        try
        {
            final Status st = fr.status();
           
            assertEquals( Status.Severity.ERROR, st.severity() );
            assertEquals( "Function Message does not accept nulls in position 0.", st.message() );
        }
        finally
View Full Code Here

       
        final FunctionResult fr = ExpressionLanguageParser.parse( "${ Message( 'abc' ) }" ).evaluate( context );
       
        try
        {
            final Status st = fr.status();
           
            assertEquals( Status.Severity.ERROR, st.severity() );
            assertEquals( "Function Message( java.lang.String ) is undefined.", st.message() );
        }
        finally
View Full Code Here

       
        final FunctionResult fr = ExpressionLanguageParser.parse( "${ Enabled( null ) }" ).evaluate( context );
       
        try
        {
            final Status st = fr.status();
           
            assertEquals( Status.Severity.ERROR, st.severity() );
            assertEquals( "Function Enabled does not accept nulls in position 0.", st.message() );
        }
        finally
View Full Code Here

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.