package test.leecode.intelligence;
import org.junit.Assert;
import org.junit.Test;
import cn.fansunion.leecode.intelligence.FindTheTownJudge;
/**
* @author wen.lei@brgroup.com
*
* 2022-3-12
*/
public class FindTheTownJudgeTest {
@Test
public void test() {
FindTheTownJudge test = new FindTheTownJudge();
int junde1 = test.findJudge(1, new int[][] {});
Assert.assertEquals(1, junde1);
int junde2 = test.findJudge(2, new int[][] {{1, 2}});
Assert.assertEquals(2, junde2);
int junde3 = test.findJudge(3, new int[][] {{1,3},{2,3}});
Assert.assertEquals(3, junde3);
int jundeN1 = test.findJudge(3, new int[][] {{1,3},{2,3},{3,1}});
Assert.assertEquals(-1, jundeN1);
}
}