-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #344 from OpenSRP/translation-fixes-ba-master
Translation fixes for BA in master
- Loading branch information
Showing
4 changed files
with
50 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
...src/test/java/org/smartregister/chw/core/fragment/CoreAllClientsRegisterFragmentTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package org.smartregister.chw.core.fragment; | ||
|
||
|
||
import org.junit.Assert; | ||
import org.junit.Before; | ||
import org.junit.Test; | ||
import org.mockito.Mock; | ||
import org.mockito.Mockito; | ||
import org.mockito.MockitoAnnotations; | ||
import org.robolectric.util.ReflectionHelpers; | ||
import org.smartregister.chw.core.BaseUnitTest; | ||
import org.smartregister.chw.core.R; | ||
import org.smartregister.chw.core.presenter.CoreAllClientsRegisterFragmentPresenter; | ||
|
||
public class CoreAllClientsRegisterFragmentTest extends BaseUnitTest { | ||
|
||
|
||
@Mock | ||
private CoreAllClientsRegisterFragmentPresenter presenter; | ||
|
||
private CoreAllClientsRegisterFragment fragment; | ||
|
||
@Before | ||
public void setUp() { | ||
MockitoAnnotations.initMocks(this); | ||
fragment = Mockito.mock(CoreAllClientsRegisterFragment.class, Mockito.CALLS_REAL_METHODS); | ||
ReflectionHelpers.setField(fragment, "presenter", presenter); | ||
} | ||
|
||
@Test | ||
public void presenterInitializesCorrectly() { | ||
fragment.initializePresenter(); | ||
Assert.assertNotNull(presenter); | ||
} | ||
|
||
@Test | ||
public void testGetToolbarTitle() { | ||
int title = fragment.getToolBarTitle(); | ||
Assert.assertEquals(R.string.menu_all_clients, title); | ||
} | ||
} |