Examples of ATermManchesterSyntaxRenderer


Examples of org.mindswap.pellet.output.ATermManchesterSyntaxRenderer

  }

  @Test
  public void testOneOf() {
    StringWriter s = new StringWriter();
    ATermRenderer r = new ATermManchesterSyntaxRenderer();
    r.setWriter( new PrintWriter( s ) );

    ATermAppl C = term( "C" );
    ATermAppl D = term( "D" );
    ATermAppl E = term( "E" );

    r.visit( oneOf( C, D, E ) );

    // oneOf inserts new list elements on top of the list
    String expected = "{E D C}";
    String actual = s.toString();
View Full Code Here

Examples of org.mindswap.pellet.output.ATermManchesterSyntaxRenderer

  }

  @Test
  public void testOr() {
    StringWriter s = new StringWriter();
    ATermRenderer r = new ATermManchesterSyntaxRenderer();
    r.setWriter( new PrintWriter( s ) );

    ATermAppl C = term( "C" );
    ATermAppl D = term( "D" );
    ATermAppl E = term( "E" );

    r.visit( or( C, D, E ) );

    String expected = "(C or D or E)";
    String actual = s.toString();

    assertEquals( expected, actual );
View Full Code Here

Examples of org.mindswap.pellet.output.ATermManchesterSyntaxRenderer

  }

  @Test
  public void testSelf() {
    StringWriter s = new StringWriter();
    ATermRenderer r = new ATermManchesterSyntaxRenderer();
    r.setWriter( new PrintWriter( s ) );

    ATermAppl p = term( "p" );

    r.visit( self( p ) );

    String expected = "(p Self)";
    String actual = s.toString();

    assertEquals( expected, actual );
View Full Code Here

Examples of org.mindswap.pellet.output.ATermManchesterSyntaxRenderer

  }

  @Test
  public void testSome() {
    StringWriter s = new StringWriter();
    ATermRenderer r = new ATermManchesterSyntaxRenderer();
    r.setWriter( new PrintWriter( s ) );

    ATermAppl C = term( "C" );
    ATermAppl p = term( "p" );

    r.visit( some( p, C ) );

    String expected = "(p some C)";
    String actual = s.toString();

    assertEquals( expected, actual );
View Full Code Here

Examples of org.mindswap.pellet.output.ATermManchesterSyntaxRenderer

  }

  @Test
  public void test1() {
    StringWriter s = new StringWriter();
    ATermRenderer r = new ATermManchesterSyntaxRenderer();
    r.setWriter( new PrintWriter( s ) );

    ATermAppl C = term( "C" );
    ATermAppl D = term( "D" );
    ATermAppl p = term( "p" );

    r.visit( and( C, some( p, D ) ));

    String expected = "(C and (p some D))";
    String actual = s.toString();

    assertEquals( expected, actual );
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.