Search in sources :

Example 1 with ParserInput

use of com.nike.riposte.util.text.parsercombinator.Parser.ParserInput in project riposte by Nike-Inc.

the class ParserTest method test_parser_input_compares_two_different_instances_correctly.

@Test
public void test_parser_input_compares_two_different_instances_correctly() {
    ParserInput inputOne = new ParserInput("one", 0);
    ParserInput inputTwo = new ParserInput("two", 0);
    assertThat(inputOne).isNotEqualTo(inputTwo);
    assertThat(inputOne.hashCode()).isNotEqualTo(inputTwo.hashCode());
}
Also used : ParserInput(com.nike.riposte.util.text.parsercombinator.Parser.ParserInput) Test(org.junit.Test)

Example 2 with ParserInput

use of com.nike.riposte.util.text.parsercombinator.Parser.ParserInput in project riposte by Nike-Inc.

the class ParserTest method test_parser_input_compares_two_indentical_instances_correctly.

@Test
public void test_parser_input_compares_two_indentical_instances_correctly() {
    ParserInput inputOne = new ParserInput("test", 0);
    ParserInput inputTwo = new ParserInput("test", 0);
    assertThat(inputOne).isEqualTo(inputTwo);
    assertThat(inputOne.hashCode()).isEqualTo(inputTwo.hashCode());
}
Also used : ParserInput(com.nike.riposte.util.text.parsercombinator.Parser.ParserInput) Test(org.junit.Test)

Aggregations

ParserInput (com.nike.riposte.util.text.parsercombinator.Parser.ParserInput)2 Test (org.junit.Test)2