Examples of ScriptElement


Examples of com.hp.jena3.rules.acceptance.ScriptElement

public class TestScriptElement
    {
    @Test public void ensureGetCommandReturnsCommandComponent()
        {
        ScriptElement e = new ScriptElement( "command", "body" );
        assertEquals( "command", e.getCommand() );
        }
View Full Code Here

Examples of com.hp.jena3.rules.acceptance.ScriptElement

        assertEquals( "command", e.getCommand() );
        }
   
    @Test public void ensureGetCommandWithArgumentsReturnsCommandComponent()
        {
        ScriptElement e = new ScriptElement( "command", listOfStrings( "ignored" ), "body" );
        assertEquals( "command", e.getCommand() );
        }
View Full Code Here

Examples of com.hp.jena3.rules.acceptance.ScriptElement

        assertEquals( "command", e.getCommand() );
        }
   
    @Test public void ensureGetBodyReturnsBodyComponent()
        {
        ScriptElement e = new ScriptElement( "command", "body" );
        assertEquals( "body", e.getBody() );
        }
View Full Code Here

Examples of com.hp.jena3.rules.acceptance.ScriptElement

        assertEquals( "body", e.getBody() );
        }
   
    @Test public void ensureGetBodyWithArgumentsReturnsBodyComponent()
        {
        ScriptElement e = new ScriptElement( "command", listOfStrings( "" ), "body" );
        assertEquals( "body", e.getBody() );
        }
View Full Code Here

Examples of com.hp.jena3.rules.acceptance.ScriptElement

        assertEquals( "body", e.getBody() );
        }
   
    @Test public void ensureGetArgumentsWithNoneReturnsEmpty()
        {
        ScriptElement e = new ScriptElement( "command", "body" );
        assertEquals( new ArrayList<String>(), e.getArguments() );
        }
View Full Code Here

Examples of com.hp.jena3.rules.acceptance.ScriptElement

        assertEquals( new ArrayList<String>(), e.getArguments() );
        }
   
    @Test public void ensureToStringDisplaysComponents()
        {
        ScriptElement e = new ScriptElement( "command", "body" );
        assertEquals( "<command|body>", e.toString() );
        }
View Full Code Here

Examples of com.hp.jena3.rules.acceptance.ScriptElement

        assertEquals( "<command|body>", e.toString() );
        }
   
    @Test public void ensureToStringDisplaysArgumentComponents()
        {
        ScriptElement e = new ScriptElement( "command", listOfStrings( "grey 17" ), "body" );
        assertEquals( "<command grey 17|body>", e.toString() );
        }
View Full Code Here

Examples of com.hp.jena3.rules.acceptance.ScriptElement

        assertEquals( "<command grey 17|body>", e.toString() );
        }
   
    @Test public void ensureToStringEscapesNewlines()
        {
        ScriptElement e = new ScriptElement( "command", "bo\ndy\n" );
        assertEquals( "<command|bo\\ndy\\n>", e.toString() );
        }
View Full Code Here

Examples of com.hp.jena3.rules.acceptance.ScriptElement

        }
   
    @Test public void ensureScriptElementHashcodeDependsOnComponents()
        {
        String command = "advance", body = "clock";
        ScriptElement e = new ScriptElement( command, body );
        assertEquals( command.hashCode() ^ body.hashCode(), e.hashCode() );
        }
View Full Code Here

Examples of com.hp.jena3.rules.acceptance.ScriptElement

        assertEquals( command.hashCode() ^ body.hashCode(), e.hashCode() );
        }
   
    @Test public void ensureScriptElementEqualityWorks()
        {
        assertEquals( new ScriptElement( "A", "B" ), new ScriptElement( "A", "B" ) );
        assertEquals( new ScriptElement( "A", listOfStrings( "grey 17" ), "B" ), new ScriptElement( "A", listOfStrings( "grey 17" ), "B" ) );
        assertDiffer( new ScriptElement( "A", listOfStrings( "grey 17" ), "B" ), new ScriptElement( "A", listOfStrings( "gray 17" ), "B" ) );
        assertDiffer( new ScriptElement( "A", listOfStrings( "grey 17" ), "B" ), new ScriptElement( "A", "B" ) );
        assertDiffer( new ScriptElement( "A", listOfStrings( "grey 17" ), "B" ), new ScriptElement( "A", listOfStrings( "grey" ), "B" ) );
        assertDiffer( new ScriptElement( "A", "B" ), new ScriptElement( "A", "C" ) );
        assertDiffer( new ScriptElement( "A", "B" ), new ScriptElement( "D", "B" ) );
        assertDiffer( new ScriptElement( "A", "B" ), new ScriptElement( "C", "D" ) );
        }
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.