/src/main/resources/com/onresolve/jira/groovy/test/TestFireEventWhen.groovy
https://bitbucket.org/sorin/jira-plugin-intellij · Groovy · 55 lines · 32 code · 15 blank · 8 comment · 0 complexity · f16a2ebe2dd1b6c4d68a3cb3ba36d12c MD5 · raw file
- package com.onresolve.jira.groovy.test
-
- import com.atlassian.jira.issue.comments.Comment
- import org.apache.log4j.Category
- import org.junit.After
- import org.junit.Before
- import org.junit.Test
- import static junit.framework.Assert.assertNotNull
-
- /**
- * User: jechlin2
- * Date: 13-Dec-2010
- * Time: 17:36:00
- */
- class TestFireEventWhen extends BaseSubTaskTest {
-
- Category log = Category.getInstance(this.class)
-
- @Before
- public void setUp() {
- log.debug ("setUp")
-
- log.debug ("issueType: ${issueType.getName()}")
- assertNotNull(project)
-
- issue = componentManager.getIssueFactory().getIssue()
- issue.setProject(project.getGenericValue())
-
- issue.setSummary "my summary"
- issue.setReporterId "admin"
- issue.setIssueType issueType.getGenericValue()
- issue.setPriorityId('2')
- issueManager.createIssue(adminUser, issue);
- log.debug ("Created issue: $issue")
-
- }
-
-
- @After
- public void tearDown() {
- deleteIssue(issue);
- }
-
- @Test
- public void testSubTasksResolved() {
- // test with no sub-tasks
- Comment comment = componentManager.getCommentManager().create(issue, adminUser.name, "My comment", false)
-
- // doesn't work
- // runner.run(FireEventWhen.class.getName(), [transientVars: [issue: issue, commentValue: comment], Event: '2', username:adminUser.name] as Map<String, Object>)
-
- }
-
-
- }