Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
fix,test(Functional test): fix broken functional test
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex Eng committed Jul 17, 2015
1 parent 07800cd commit a3f6605
Showing 1 changed file with 7 additions and 0 deletions.
Expand Up @@ -23,8 +23,11 @@

import static org.mockito.Matchers.any;
import static org.mockito.Matchers.anyInt;
import static org.mockito.Matchers.anyObject;
import static org.mockito.Matchers.anyString;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
Expand Down Expand Up @@ -126,6 +129,8 @@ public void setup() {
@Test
public void documentMilestoneEventTranslatedTest() {
DocumentServiceImpl spyService = Mockito.spy(documentService);
doNothing().when(spyService).publishDocumentMilestoneEvent(
any(WebHook.class), any(DocumentMilestoneEvent.class));

WordStatistic stats = new WordStatistic(0, 0, 0, 10, 0);
when(translationStateCacheImpl.getDocumentStatistics(docId, localeId))
Expand Down Expand Up @@ -170,6 +175,8 @@ public void documentMilestoneEventTranslatedNot100Test() {
@Test
public void documentMilestoneEventApprovedTest() {
DocumentServiceImpl spyService = Mockito.spy(documentService);
doNothing().when(spyService).publishDocumentMilestoneEvent(
any(WebHook.class), any(DocumentMilestoneEvent.class));

WordStatistic stats = new WordStatistic(10, 0, 0, 0, 0);
when(translationStateCacheImpl.getDocumentStatistics(docId, localeId))
Expand Down

0 comments on commit a3f6605

Please sign in to comment.