Skip to content

Commit

Permalink
BZ:1283537 - jbpmHumanTasksWithUser links PeopleAssignments_PotOwners…
Browse files Browse the repository at this point in the history
….task_id to AuditTaskImpl.id instead of AuditTaskImpl.taskId
  • Loading branch information
nmirasch authored and csadilek committed Nov 24, 2015
1 parent 0280ce8 commit 07e0288
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 28 deletions.
11 changes: 0 additions & 11 deletions jbpm-console-ng-showcase/pom.xml
Expand Up @@ -922,17 +922,6 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.google.gwt.gwtmockito</groupId>
<artifactId>gwtmockito</artifactId>
<scope>test</scope>
</dependency>

<dependency><!-- to get CallerMock in unit test-->
<groupId>org.uberfire</groupId>
<artifactId>uberfire-testing-utils</artifactId>
<scope>test</scope>
</dependency>

</dependencies>

Expand Down
Expand Up @@ -62,11 +62,6 @@ protected void init() {
registerDataSetDefinitions();
}

public void setDataSetDefRegistry(DataSetDefRegistry dataSetDefRegistry){
this.dataSetDefRegistry = dataSetDefRegistry;
}


protected void registerDataSetDefinitions() {

DataSetDef humanTasksDef = DataSetFactory.newSQLDataSetDef()
Expand Down Expand Up @@ -124,7 +119,7 @@ protected void registerDataSetDefinitions() {
+ "from AuditTaskImpl t, "
+ "PeopleAssignments_PotOwners po, "
+ "OrganizationalEntity oe "
+ "where t.id = po.task_id and po.entity_id = oe.id", false )
+ "where t.taskId = po.task_id and po.entity_id = oe.id", false )
.date(DataSetTasksListGridViewImpl.COLUMN_ACTIVATIONTIME)
.label(DataSetTasksListGridViewImpl.COLUMN_ACTUALOWNER)
.label(DataSetTasksListGridViewImpl.COLUMN_CREATEDBY)
Expand Down Expand Up @@ -155,7 +150,7 @@ protected void registerDataSetDefinitions() {
+ "from AuditTaskImpl t, "
+ "PeopleAssignments_BAs bas, "
+ "OrganizationalEntity oe "
+ "where t.id = bas.task_id and bas.entity_id = oe.id", false)
+ "where t.taskId = bas.task_id and bas.entity_id = oe.id", false)
.date(DataSetTasksListGridViewImpl.COLUMN_ACTIVATIONTIME)
.label(DataSetTasksListGridViewImpl.COLUMN_ACTUALOWNER)
.label(DataSetTasksListGridViewImpl.COLUMN_CREATEDBY)
Expand Down
Expand Up @@ -15,32 +15,28 @@
*/
package org.jbpm.console.ng.server.impl;

import com.google.gwtmockito.GwtMockitoTestRunner;

import org.dashbuilder.dataset.def.DataSetDef;
import org.dashbuilder.dataset.def.DataSetDefRegistry;
import org.junit.Before;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;

import static org.mockito.Matchers.any;
import static org.mockito.Mockito.*;

@RunWith(GwtMockitoTestRunner.class)
@RunWith(MockitoJUnitRunner.class)
public class DashbuilderBootstrapTest {

@Mock
DataSetDefRegistry dataSetDefRegistryMock;

@InjectMocks
DashbuilderBootstrap dashbuilderBootstrap;

@Before
public void setupMocks() {
dashbuilderBootstrap = new DashbuilderBootstrap();
dashbuilderBootstrap.setDataSetDefRegistry(dataSetDefRegistryMock);

}

@Test
public void registerDataSetDefinitionsTest() {
dashbuilderBootstrap.registerDataSetDefinitions();
Expand Down

0 comments on commit 07e0288

Please sign in to comment.