@@ -0,0 +1,3559 @@
+/*%0A * Copyright (c) 2014 Ushahidi.%0A *%0A * This program is free software: you can redistribute it and/or modify it under%0A * the terms of the GNU Affero General Public License as published by the Free%0A * Software Foundation, either version 3 of the License, or (at your option)%0A * any later version.%0A *%0A * This program is distributed in the hope that it will be useful, but WITHOUT%0A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS%0A * FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.%0A *%0A * You should have received a copy of the GNU Affero General Public License%0A * along with this program in the file LICENSE-AGPL. If not, see%0A * https://www.gnu.org/licenses/agpl-3.0.html%0A */%0A%0Apackage com.ushahidi.android.core.usecase.deployment;%0A%0Aimport com.ushahidi.android.core.respository.IDeploymentRepository;%0Aimport com.ushahidi.android.core.task.PostExecutionThread;%0Aimport com.ushahidi.android.core.task.ThreadExecutor;%0Aimport com.ushahidi.android.core.usecase.IInteractor;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.mockito.Mock;%0Aimport org.mockito.MockitoAnnotations;%0A%0Aimport static org.mockito.Matchers.any;%0Aimport static org.mockito.Mockito.doNothing;%0Aimport static org.mockito.Mockito.mock;%0Aimport static org.mockito.Mockito.verify;%0Aimport static org.mockito.Mockito.verifyNoMoreInteractions;%0Aimport static org.mockito.Mockito.verifyZeroInteractions;%0A%0A/**%0A * Tests List Post use case%0A *%0A * @author Ushahidi Team %3Cteam@ushahidi.com%3E%0A */%0Apublic class ListDeploymentTest %7B%0A%0A    @Mock%0A    private ThreadExecutor mMockThreadExecutor;%0A%0A    @Mock%0A    private PostExecutionThread mMockPostExecutionThread;%0A%0A    @Mock%0A    private IDeploymentRepository mMockDeploymentRepository;%0A%0A    private ListDeployment mListDeployment;%0A%0A    @Before%0A    public void setUp() %7B%0A        MockitoAnnotations.initMocks(this);%0A%0A        mListDeployment = new ListDeployment(mMockDeploymentRepository, mMockThreadExecutor,%0A                mMockPostExecutionThread);%0A%0A    %7D%0A%0A    @Test%0A    public void testListDeploymentExecution() %7B%0A        doNothing().when(mMockThreadExecutor).execute(any(IInteractor.class));%0A%0A        ListDeployment.Callback mockListDeploymentCallback = mock(%0A                ListDeployment.Callback.class);%0A%0A        mListDeployment.execute(mockListDeploymentCallback);%0A%0A        verify(mMockThreadExecutor).execute(any(IInteractor.class));%0A        verifyNoMoreInteractions(mMockThreadExecutor);%0A        verifyZeroInteractions(mMockDeploymentRepository);%0A        verifyZeroInteractions(mMockPostExecutionThread);%0A    %7D%0A%0A    @Test%0A    public void testListDeploymentRun() %7B%0A        doNothing().when(mMockThreadExecutor).execute(any(IInteractor.class));%0A        ListDeployment.Callback mockListDeploymentCallback = mock(%0A                ListDeployment.Callback.class);%0A        doNothing().when(mMockDeploymentRepository).getDeploymentList(%0A                any(IDeploymentRepository.DeploymentListCallback.class));%0A%0A        mListDeployment.execute(mockListDeploymentCallback);%0A        mListDeployment.run();%0A%0A        verify(mMockDeploymentRepository).getDeploymentList(%0A                any(IDeploymentRepository.DeploymentListCallback.class));%0A%0A        verify(mMockThreadExecutor).execute(any(IInteractor.class));%0A        verifyNoMoreInteractions(mMockDeploymentRepository);%0A        verifyNoMoreInteractions(mMockPostExecutionThread);%0A    %7D%0A%0A    @Test(expected = IllegalArgumentException.class)%0A    public void testListDeploymentNullParameter() %7B%0A        mListDeployment.execute(null);%0A    %7D%0A%7D%0A

Add test cases for list deployments. Fixes T719