/*
 * @author Ranides Atterwim {@literal <ranides@gmail.com>}
 * @copyright Ranides Atterwim
 * @license WTFPL
 * @url http://ranides.net/projects/assira
 */
package net.ranides.assira.reflection;

import java.lang.reflect.Method;

import net.ranides.test.mockup.reflection.ForMethodUtils;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author Ranides Atterwim {@literal <ranides@gmail.com>}
 */
public class IMethodsTest {

    @Test
    public void testInfo2() {
        Method m1 = IClass.typeinfo(ForMethodUtils.MCP.class).method("some1").get().reflective();
        Method m2 = IClass.typeinfo(ForMethodUtils.MCP.class).method("some2").get().reflective();
        IMethods m = IMethods.typeinfo(m1, m2);

        ForMethodUtils.MCP<?> mcp = new ForMethodUtils.MCP<>();        
        assertEquals(777, m.first().get().call(mcp));
        assertEquals(444, m.list().get(1).invoke(mcp));
    }
    
}
