/**
 * Copyright 2008-2009. Chongqing Communications Industry Services Co.,Ltd Information Technology Branch. All rights reserved. <a>http://www.crunii.com</a>
 */
package com.crunii.micro.api.test;

import java.util.HashSet;
import java.util.Set;

import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

import com.crunii.micro.service.sysmgr.dto.sysmgr.MenuC;
import com.crunii.micro.service.sysmgr.service.MenuService;

/**
 * @author 田平 create 2019年6月5日上午10:16:09
 */
public class MenuServiceTest extends SysmgrBaseTest {

	@Autowired
	private MenuService menuService;

	// @Test
	public void testRecursive() {
		Set<String> parents = new HashSet<String>();
		menuService.recursiveParents("1004012", parents);
		parents.stream().forEach(System.out::println);
	}

	@Test
	public void testCreate() {
		MenuC menuC = new MenuC();
		menuC.setMenuDesc("aaa");
		menuC.setIcon("abc");
		menuC.setMenuUrl("bbb");
		menuC.setMenuName("dddd");
		menuC.setSortId(1);
		menuC.setParentMenuCode("1006");
		menuService.createMenu(menuC);
	}

}
