From cf206c33bc4c7fd2f7586aaae971634598b49c53 Mon Sep 17 00:00:00 2001 From: Tom Morris Date: Thu, 6 Oct 2011 21:09:31 +0000 Subject: [PATCH] Update test to accommodate new test for pending operations git-svn-id: http://google-refine.googlecode.com/svn/trunk@2282 7d457c2a-affb-35e4-300a-418c747d4874 --- .../src/com/google/refine/tests/ProjectManagerTests.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main/tests/server/src/com/google/refine/tests/ProjectManagerTests.java b/main/tests/server/src/com/google/refine/tests/ProjectManagerTests.java index 5edfe6a2d..0eb738bcc 100644 --- a/main/tests/server/src/com/google/refine/tests/ProjectManagerTests.java +++ b/main/tests/server/src/com/google/refine/tests/ProjectManagerTests.java @@ -54,6 +54,7 @@ import org.testng.annotations.Test; import com.google.refine.ProjectMetadata; import com.google.refine.model.Project; +import com.google.refine.process.ProcessManager; import com.google.refine.tests.model.ProjectStub; public class ProjectManagerTests extends RefineTest { @@ -61,6 +62,7 @@ public class ProjectManagerTests extends RefineTest { ProjectManagerStub SUT; Project project; ProjectMetadata metadata; + ProcessManager procmgr; @Override @BeforeTest @@ -74,6 +76,9 @@ public class ProjectManagerTests extends RefineTest { SUT = spy(pm); project = mock(Project.class); metadata = mock(ProjectMetadata.class); + procmgr = mock(ProcessManager.class); + when(project.getProcessManager()).thenReturn(procmgr); + when(procmgr.hasPending()).thenReturn(false); // always false for now, but should test separately } @AfterMethod @@ -155,6 +160,7 @@ public class ProjectManagerTests extends RefineTest { SUT.save(true); verify(metadata, times(1)).getModified(); + verify(project, times(1)).getProcessManager(); verify(project, times(2)).getLastSave(); verify(project, times(1)).dispose(); verify(SUT, never()).saveProject(project);