// Path: src/main/java/org/smallibs/suitcase/utils/Pair.java
// public class Pair<T1, T2> {
// 
//     public final T1 _1;
//     public final T2 _2;
// 
//     public Pair(T1 _1, T2 _2) {
//         this._1 = _1;
//         this._2 = _2;
//     }
// }
// 
// Path: src/main/java/org/smallibs/suitcase/cases/core/Cases.java
// static <T> Case.WithoutCapture<T, T> Any() {
//     return new Case0<T, T>(Optional::of).$();
// }
// 
// Path: src/main/java/org/smallibs/suitcase/cases/core/Cases.java
// static <T> Var.WithoutInnerCapture<T, T> Var() {
//     return Var(Any());
// }
// 
// Path: src/main/java/org/smallibs/suitcase/cases/lang/Pairs.java
// static <T1, T2> Case2<Pair<T1, T2>, Pair<T1, T2>, T1, T2> Pair() {
//     return new Case2<>(
//             Optional::of,
//             l -> l._1,
//             l -> l._2
//     );
// }


import junit.framework.TestCase;
import org.junit.Test;
import org.smallibs.suitcase.utils.Pair;
import static java.util.function.Function.identity;
import static org.smallibs.suitcase.cases.core.Cases.Any;
import static org.smallibs.suitcase.cases.core.Cases.Var;
import static org.smallibs.suitcase.cases.lang.Pairs.Pair;
/*
 * Copyright (C)2015 D. Plaindoux.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation; either version 2, or (at your option) any
 * later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; see the file COPYING.  If not, write to
 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 */

package org.smallibs.suitcase.match;



public class PairMatcherTest {

    @Test
    public void shouldMatchAPair() {
        final Matcher<Object, Boolean> matcher = Matcher.create();

// Path: src/main/java/org/smallibs/suitcase/utils/Pair.java
// public class Pair<T1, T2> {
// 
//     public final T1 _1;
//     public final T2 _2;
// 
//     public Pair(T1 _1, T2 _2) {
//         this._1 = _1;
//         this._2 = _2;
//     }
// }
// 
// Path: src/main/java/org/smallibs/suitcase/cases/core/Cases.java
// static <T> Case.WithoutCapture<T, T> Any() {
//     return new Case0<T, T>(Optional::of).$();
// }
// 
// Path: src/main/java/org/smallibs/suitcase/cases/core/Cases.java
// static <T> Var.WithoutInnerCapture<T, T> Var() {
//     return Var(Any());
// }
// 
// Path: src/main/java/org/smallibs/suitcase/cases/lang/Pairs.java
// static <T1, T2> Case2<Pair<T1, T2>, Pair<T1, T2>, T1, T2> Pair() {
//     return new Case2<>(
//             Optional::of,
//             l -> l._1,
//             l -> l._2
//     );
// }


// Path: src/test/java/org/smallibs/suitcase/match/PairMatcherTest.java
import junit.framework.TestCase;
import org.junit.Test;
import org.smallibs.suitcase.utils.Pair;
import static java.util.function.Function.identity;
import static org.smallibs.suitcase.cases.core.Cases.Any;
import static org.smallibs.suitcase.cases.core.Cases.Var;
import static org.smallibs.suitcase.cases.lang.Pairs.Pair;

/*
 * Copyright (C)2015 D. Plaindoux.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published
 * by the Free Software Foundation; either version 2, or (at your option) any
 * later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; see the file COPYING.  If not, write to
 * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
 */

package org.smallibs.suitcase.match;



public class PairMatcherTest {

    @Test
    public void shouldMatchAPair() {
        final Matcher<Object, Boolean> matcher = Matcher.create();

        matcher.caseOf(Pair(Any(), Any())).then(true);