view src/test/java/jp/ac/u_ryukyu/cr/ie/tatsuki/functionTest/deepParentOrganizationIdsPlusTest.java @ 22:b6b5e3f48988

deepParentOrganizationIdsPlusTest and Method
author one
date Mon, 27 Oct 2014 09:41:14 +0900
parents
children ef3fae2e7f0c
line wrap: on
line source

package jp.ac.u_ryukyu.cr.ie.tatsuki.functionTest;

import java.util.Iterator;
import java.util.LinkedList;

import jp.ac.u_ryukyu.cr.ie.tatsuki.bbs.JuGrix;
import junit.framework.Assert;

import org.junit.Test;

public class deepParentOrganizationIdsPlusTest {
	@Test
	public void deepParentOrganizationIdsPlus(){
		JuGrix jugrix = new JuGrix();
		LinkedList<String> filterIds = new LinkedList<String>();
		//filterIds.add("r:2");
		Iterator<String> childrenIds = jugrix.deepParentOrganizationIdsPlus("o:2", filterIds);
		
		Assert.assertEquals(childrenIds.next(),"o:23");
		Assert.assertEquals(childrenIds.next(),"o:22");
		
		filterIds.add("r:2");
		childrenIds = jugrix.deepParentOrganizationIds("o:2", filterIds);
		
		Assert.assertEquals(childrenIds.next(),"o:23");

	}
}