Package org.yaml.snakeyaml.error

Examples of org.yaml.snakeyaml.error.Mark


        AnchorToken token = new AnchorToken("&id123", mark, mark);
        assertEquals("value=&id123", token.getArguments());
    }

    public void testGetTokenId() {
        Mark mark = new Mark("test1", 0, 0, 0, "*The first line.\nThe last line.", 0);
        AnchorToken token = new AnchorToken("&id123", mark, mark);
        assertEquals(ID.Anchor, token.getTokenId());
    }
View Full Code Here


import org.yaml.snakeyaml.tokens.Token.ID;

public class DocumentStartTokenTest extends TestCase {

    public void testGetTokenId() {
        Mark mark = new Mark("test1", 0, 0, 0, "*The first line.\nThe last line.", 0);
        DocumentStartToken token = new DocumentStartToken(mark, mark);
        assertEquals(ID.DocumentStart, token.getTokenId());
    }
View Full Code Here

import org.yaml.snakeyaml.tokens.Token.ID;

public class DirectiveTokenTest extends TestCase {

    public void testGetArguments() {
        Mark mark = new Mark("test1", 0, 0, 0, "*The first line.\nThe last line.", 0);
        DirectiveToken<Integer> token = new DirectiveToken<Integer>("YAML", null, mark, mark);
        assertEquals("name=YAML", token.getArguments());
    }
View Full Code Here

        DirectiveToken<Integer> token = new DirectiveToken<Integer>("YAML", null, mark, mark);
        assertEquals("name=YAML", token.getArguments());
    }

    public void testInvalidList() {
        Mark mark = new Mark("test1", 0, 0, 0, "*The first line.\nThe last line.", 0);
        List<Integer> list = new ArrayList<Integer>();
        list.add(new Integer(1));
        try {
            new DirectiveToken<Integer>("YAML", list, mark, mark);
            fail("List must have 2 values.");
View Full Code Here

            assertEquals("Two strings must be provided instead of 1", e.getMessage());
        }
    }

    public void testTag() {
        Mark mark = new Mark("test1", 0, 0, 0, "*The first line.\nThe last line.", 0);
        List<String> list = new ArrayList<String>();
        list.add("!foo");
        list.add("!bar");
        DirectiveToken<String> token = new DirectiveToken<String>("TAG", list, mark, mark);
        assertEquals("name=TAG, value=[!foo, !bar]", token.getArguments());
View Full Code Here

        DirectiveToken<String> token = new DirectiveToken<String>("TAG", list, mark, mark);
        assertEquals("name=TAG, value=[!foo, !bar]", token.getArguments());
    }

    public void testList() {
        Mark mark = new Mark("test1", 0, 0, 0, "*The first line.\nThe last line.", 0);
        List<Integer> list = new ArrayList<Integer>();
        list.add(new Integer(1));
        list.add(new Integer(1));
        DirectiveToken<Integer> token = new DirectiveToken<Integer>("YAML", list, mark, mark);
        assertEquals("name=YAML, value=[1, 1]", token.getArguments());
View Full Code Here

        DirectiveToken<Integer> token = new DirectiveToken<Integer>("YAML", list, mark, mark);
        assertEquals("name=YAML, value=[1, 1]", token.getArguments());
    }

    public void testGetTokenId() {
        Mark mark = new Mark("test1", 0, 0, 0, "*The first line.\nThe last line.", 0);
        DirectiveToken<Integer> token = new DirectiveToken<Integer>("YAML", null, mark, mark);
        assertEquals(ID.Directive, token.getTokenId());
    }
View Full Code Here

import org.yaml.snakeyaml.tokens.Token.ID;

public class DocumentEndTokenTest extends TestCase {

    public void testGetTokenId() {
        Mark mark = new Mark("test1", 0, 0, 0, "*The first line.\nThe last line.", 0);
        DocumentEndToken token = new DocumentEndToken(mark, mark);
        assertEquals(ID.DocumentEnd, token.getTokenId());
    }
View Full Code Here

import org.yaml.snakeyaml.tokens.Token.ID;

public class AliasTokenTest extends TestCase {

    public void testEquals() {
        Mark mark = new Mark("test1", 0, 0, 0, "*The first line.\nThe last line.", 0);
        AliasToken token = new AliasToken("*id123", mark, mark);
        assertFalse(token.equals(mark));
    }
View Full Code Here

        AliasToken token = new AliasToken("*id123", mark, mark);
        assertFalse(token.equals(mark));
    }

    public void testGetArguments() {
        Mark mark = new Mark("test1", 0, 0, 0, "*The first line.\nThe last line.", 0);
        AliasToken token = new AliasToken("*id123", mark, mark);
        assertEquals("value=*id123", token.getArguments());
    }
View Full Code Here

TOP

Related Classes of org.yaml.snakeyaml.error.Mark

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.