-
Notifications
You must be signed in to change notification settings - Fork 3
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 #335 from opensrp/v0_10-optimize-filter-selection-…
…condition Optimize Filter Selection Condition - v0.10
- Loading branch information
Showing
6 changed files
with
58 additions
and
101 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
28 changes: 28 additions & 0 deletions
28
...ild/src/test/java/org/smartregister/child/provider/AdvancedSearchClientsProviderTest.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,28 @@ | ||
package org.smartregister.child.provider; | ||
|
||
import static org.mockito.ArgumentMatchers.any; | ||
import static org.mockito.ArgumentMatchers.eq; | ||
import static org.mockito.Mockito.doReturn; | ||
import static org.mockito.Mockito.mock; | ||
import static org.mockito.Mockito.verify; | ||
import static org.mockito.Mockito.when; | ||
|
||
import android.view.LayoutInflater; | ||
|
||
import org.junit.Test; | ||
import org.smartregister.child.BaseUnitTest; | ||
import org.smartregister.child.R; | ||
|
||
public class AdvancedSearchClientsProviderTest extends BaseUnitTest { | ||
|
||
@Test | ||
public void testInflateLayoutForCursorAdapterInflatesCorrectView() { | ||
AdvancedSearchClientsProvider provider = mock(AdvancedSearchClientsProvider.class); | ||
LayoutInflater inflater = mock(LayoutInflater.class); | ||
doReturn(inflater).when(provider).inflater(); | ||
when(provider.inflatelayoutForCursorAdapter()).thenCallRealMethod(); | ||
provider.inflatelayoutForCursorAdapter(); | ||
verify(inflater).inflate(eq(R.layout.advanced_search_client), any()); | ||
} | ||
|
||
} |
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