// Path: advance/src/java/com/dwarfartisan/parsec/Txt.java
// public static <E, Status, Tran> Binder<List<Character>, String, E, Status, Tran> joining() {
//     return new JoinText<>();
// }


import org.junit.Assert;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;
import java.util.List;
import static com.dwarfartisan.parsec.Txt.joining;
package com.dwarfartisan.parsec;




/**
 * Many1 Tester.
 *
 * @author Mars Liu
 */
public class Many1Test extends Base {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    @Test
    public void fail() throws Exception {
        State<Character, Integer, Integer> state = newState("ello");

        Many1<Character, Character, Integer, Integer> m = new Many1<>(
                new Eq<>('h')
        );

        try {
            m.parse(state);
            Assert.fail();
        } catch (ParsecException e) {
            Assert.assertTrue(true);
        }
    }

    @Test
    public void one() throws Exception {
        Parsec<String, Character, Integer, Integer> m =
// Path: advance/src/java/com/dwarfartisan/parsec/Txt.java
// public static <E, Status, Tran> Binder<List<Character>, String, E, Status, Tran> joining() {
//     return new JoinText<>();
// }


// Path: advance/test/java/com/dwarfartisan/parsec/Many1Test.java
import org.junit.Assert;
import org.junit.Test;
import org.junit.Before;
import org.junit.After;
import java.util.List;
import static com.dwarfartisan.parsec.Txt.joining;

package com.dwarfartisan.parsec;




/**
 * Many1 Tester.
 *
 * @author Mars Liu
 */
public class Many1Test extends Base {

    @Before
    public void before() throws Exception {
    }

    @After
    public void after() throws Exception {
    }

    @Test
    public void fail() throws Exception {
        State<Character, Integer, Integer> state = newState("ello");

        Many1<Character, Character, Integer, Integer> m = new Many1<>(
                new Eq<>('h')
        );

        try {
            m.parse(state);
            Assert.fail();
        } catch (ParsecException e) {
            Assert.assertTrue(true);
        }
    }

    @Test
    public void one() throws Exception {
        Parsec<String, Character, Integer, Integer> m =
                new Many1<>(new Eq<Character, Integer, Integer>('h')).bind(joining());