use of org.openstack4j.model.identity.v3.Token in project bayou by capergroup.
the class EvidenceLLexerTests method testLexColon.
@Test
public void testLexColon() {
EvidenceLLexer lexer = makeLexer();
Iterator<Token> tokens = lexer.lex(":").iterator();
Assert.assertTrue(tokens.hasNext());
Token token = tokens.next();
Assert.assertEquals(":", token.getLexeme());
Assert.assertTrue(token.getType() instanceof TokenTypeColon);
}
use of org.openstack4j.model.identity.v3.Token in project bayou by capergroup.
the class EvidenceLLexerTests method testLexIdents.
@Test
public void testLexIdents() {
EvidenceLLexer lexer = makeLexer();
Iterator<Token> tokens = lexer.lex("ident1 ident2").iterator();
Assert.assertTrue(tokens.hasNext());
Token token = tokens.next();
Assert.assertEquals("ident1", token.getLexeme());
Assert.assertTrue(token.getType() instanceof TokenTypeIdentifier);
token = tokens.next();
Assert.assertEquals("ident2", token.getLexeme());
Assert.assertTrue(token.getType() instanceof TokenTypeIdentifier);
}
use of org.openstack4j.model.identity.v3.Token in project bayou by capergroup.
the class EvidenceLLexerTests method testLexIdent.
@Test
public void testLexIdent() {
EvidenceLLexer lexer = makeLexer();
Iterator<Token> tokens = lexer.lex("ident").iterator();
Assert.assertTrue(tokens.hasNext());
Token token = tokens.next();
Assert.assertEquals("ident", token.getLexeme());
Assert.assertTrue(token.getType() instanceof TokenTypeIdentifier);
}
use of org.openstack4j.model.identity.v3.Token in project bayou by capergroup.
the class EvidenceLLexerTests method testLexEmpty.
@Test
public void testLexEmpty() {
EvidenceLLexer lexer = makeLexer();
Iterator<Token> tokens = lexer.lex("").iterator();
Assert.assertFalse(tokens.hasNext());
}
Aggregations