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

import java.lang.reflect.Method;
import net.ranides.assira.reflection.inspect.MethodInspector;
import net.ranides.assira.reflection.mock.StrictFP;
import org.junit.Test;
import static org.junit.Assert.*;

/**
 *
 * @author Ranides Atterwim <ranides@gmail.com>
 */
public class MemberUtilsTest {
    
    private static Method fm(Class<?> clazz, String name) {
        return MethodInspector.inclass(clazz).declared().name(name).first().reflective();
    }
    
    @Test
    public void testStrict() {
        assertTrue(MemberUtils.isStrict(fm(StrictFP.Strict1.class, "method")) );
        assertTrue(MemberUtils.isStrict(fm(StrictFP.Strict2.class, "method")) );
        assertFalse(MemberUtils.isStrict(fm(StrictFP.Strict3.class, "method")) );
    }
    
}
