Skip to content

Commit

Permalink
Increase code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
hamza-vd committed Feb 23, 2023
1 parent c14e92b commit 7ee84b5
Showing 1 changed file with 28 additions and 0 deletions.
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());
}

}

0 comments on commit 7ee84b5

Please sign in to comment.