当前位置: 首页>>代码示例>>Java>>正文


Java Project.setTeamLeader方法代码示例

本文整理汇总了Java中org.ligoj.app.model.Project.setTeamLeader方法的典型用法代码示例。如果您正苦于以下问题:Java Project.setTeamLeader方法的具体用法?Java Project.setTeamLeader怎么用?Java Project.setTeamLeader使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.ligoj.app.model.Project的用法示例。


在下文中一共展示了Project.setTeamLeader方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: linkInvalidProject

import org.ligoj.app.model.Project; //导入方法依赖的package包/类
@Test
public void linkInvalidProject() throws Exception {
	thrown.expect(ValidationJsonException.class);
	thrown.expect(MatcherUtil.validationMatcher(JiraBaseResource.PARAMETER_PKEY, "jira-project"));

	final Project project = new Project();
	project.setName("TEST");
	project.setPkey("test");
	project.setTeamLeader(getAuthenticationName());
	em.persist(project);
	final Subscription subscription = new Subscription();
	subscription.setProject(project);
	subscription.setNode(nodeRepository.findOneExpected("service:bt:jira:6"));
	em.persist(subscription);
	addProjectParameters(subscription, 11111);
	em.flush();
	em.clear();
	resource.link(subscription.getId());
}
 
开发者ID:ligoj,项目名称:plugin-bt-jira,代码行数:20,代码来源:JiraPluginResourceTest.java

示例2: linkNotAdmin

import org.ligoj.app.model.Project; //导入方法依赖的package包/类
@Test
public void linkNotAdmin() throws Exception {
	final long initCount = importStatusRepository.count();
	final Project project = new Project();
	project.setName("TEST");
	project.setPkey("test");
	project.setTeamLeader(getAuthenticationName());
	em.persist(project);
	final Subscription subscription = new Subscription();
	subscription.setProject(project);
	subscription.setNode(nodeRepository.findOneExpected("service:bt:jira:6"));
	em.persist(subscription);
	addProjectParameters(subscription, 10074);
	em.createQuery("DELETE ParameterValue v WHERE v.node.id = ?1 AND v.parameter.id = ?2")
			.setParameter(2, JiraBaseResource.PARAMETER_ADMIN_USER).setParameter(1, "service:bt:jira:6").executeUpdate();
	em.flush();
	em.clear();
	resource.link(subscription.getId());
	em.flush();
	Assert.assertEquals(initCount, importStatusRepository.count());
	Assert.assertNull(resource.getTask(subscription.getId()));
}
 
开发者ID:ligoj,项目名称:plugin-bt-jira,代码行数:23,代码来源:JiraPluginResourceTest.java

示例3: link

import org.ligoj.app.model.Project; //导入方法依赖的package包/类
@Test
public void link() throws Exception {
	prepareJiraServer();

	final long initCount = importStatusRepository.count();
	final Project project = new Project();
	project.setName("TEST");
	project.setPkey("test");
	project.setTeamLeader(getAuthenticationName());
	em.persist(project);
	final Subscription subscription = new Subscription();
	subscription.setProject(project);
	subscription.setNode(nodeRepository.findOneExpected("service:bt:jira:6"));
	em.persist(subscription);
	addProjectParameters(subscription, 10074);
	em.flush();
	em.clear();
	resource.link(subscription.getId());
	em.flush();
	Assert.assertEquals(initCount, importStatusRepository.count());
	Assert.assertNull(resource.getTask(subscription.getId()));
}
 
开发者ID:ligoj,项目名称:plugin-bt-jira,代码行数:23,代码来源:JiraPluginResourceTest.java

示例4: newProject

import org.ligoj.app.model.Project; //导入方法依赖的package包/类
/**
 * Create a new project
 */
private Project newProject(final String pkey) {
	final Project project = new Project();
	project.setPkey(pkey);
	project.setName("ANY - " + pkey);
	project.setTeamLeader(DEFAULT_USER);
	em.persist(project);
	return project;
}
 
开发者ID:ligoj,项目名称:plugin-id-ldap,代码行数:12,代码来源:LdapPluginResourceTest.java

示例5: linkInvalidDatabase

import org.ligoj.app.model.Project; //导入方法依赖的package包/类
@Test(expected = CannotGetJdbcConnectionException.class)
public void linkInvalidDatabase() throws Exception {

	final Project project = new Project();
	project.setName("TEST");
	project.setPkey("test");
	project.setTeamLeader(getAuthenticationName());
	em.persist(project);

	final Subscription subscription = new Subscription();
	subscription.setProject(project);
	subscription.setNode(nodeRepository.findOneExpected(JiraBaseResource.KEY));
	em.persist(subscription);
	final ParameterValue parameterValueEntity = new ParameterValue();
	parameterValueEntity.setParameter(parameterRepository.findOne(JiraBaseResource.PARAMETER_JDBC_URL));
	parameterValueEntity.setData("jdbc:hsqldb:mem:dataSource");
	parameterValueEntity.setSubscription(subscription);
	em.persist(parameterValueEntity);
	final ParameterValue parameterValueEntity2 = new ParameterValue();
	parameterValueEntity2.setParameter(parameterRepository.findOneExpected(JiraBaseResource.PARAMETER_JDBC_DRIVER));
	parameterValueEntity2.setData("org.hsqldb.jdbc.JDBCDriver");
	parameterValueEntity2.setSubscription(subscription);
	em.persist(parameterValueEntity2);
	final ParameterValue parameterValueEntity3 = new ParameterValue();
	parameterValueEntity3.setParameter(parameterRepository.findOneExpected(JiraBaseResource.PARAMETER_JDBC_PASSSWORD));
	parameterValueEntity3.setData("invalid");
	parameterValueEntity3.setSubscription(subscription);
	em.persist(parameterValueEntity3);
	em.flush();
	em.clear();

	resource.link(subscription.getId());
}
 
开发者ID:ligoj,项目名称:plugin-bt-jira,代码行数:34,代码来源:JiraPluginResourceTest.java

示例6: linkInvalidAdmin

import org.ligoj.app.model.Project; //导入方法依赖的package包/类
@Test
public void linkInvalidAdmin() throws Exception {
	thrown.expect(ValidationJsonException.class);
	thrown.expect(MatcherUtil.validationMatcher(JiraBaseResource.PARAMETER_ADMIN_USER, "jira-admin"));

	final Project project = new Project();
	project.setName("TEST");
	project.setPkey("test");
	project.setTeamLeader(getAuthenticationName());
	em.persist(project);
	final Subscription subscription = new Subscription();
	subscription.setProject(project);
	subscription.setNode(nodeRepository.findOneExpected("service:bt:jira:6"));
	em.persist(subscription);
	addProjectParameters(subscription, 10074);

	// Set an invalid URL
	em.createQuery("UPDATE ParameterValue v SET v.data = ?3 WHERE v.node.id = ?1 AND v.parameter.id = ?2")
			.setParameter(1, JiraBaseResource.PARAMETER_URL).setParameter(2, "service:bt:jira:6").setParameter(3, "any")
			.executeUpdate();
	em.flush();
	em.clear();
	CacheManager.getInstance().getCache("subscription-parameters").removeAll();
	try {
		resource.link(subscription.getId());
	} finally {
		CacheManager.getInstance().getCache("subscription-parameters").removeAll();
	}
}
 
开发者ID:ligoj,项目名称:plugin-bt-jira,代码行数:30,代码来源:JiraPluginResourceTest.java


注:本文中的org.ligoj.app.model.Project.setTeamLeader方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。