target stringlengths 20 113k | src_fm stringlengths 11 86.3k | src_fm_fc stringlengths 21 86.4k | src_fm_fc_co stringlengths 30 86.4k | src_fm_fc_ms stringlengths 42 86.8k | src_fm_fc_ms_ff stringlengths 43 86.8k |
|---|---|---|---|---|---|
@Test public void testDetailsRepository() { DetailsRepository detailsRepository = context.detailsRepository(); Assert.assertNotNull(detailsRepository); } | public DetailsRepository detailsRepository() { if (detailsRepository == null) { detailsRepository = new DetailsRepository(); } return detailsRepository; } | Context { public DetailsRepository detailsRepository() { if (detailsRepository == null) { detailsRepository = new DetailsRepository(); } return detailsRepository; } } | Context { public DetailsRepository detailsRepository() { if (detailsRepository == null) { detailsRepository = new DetailsRepository(); } return detailsRepository; } protected Context(); } | Context { public DetailsRepository detailsRepository() { if (detailsRepository == null) { detailsRepository = new DetailsRepository(); } return detailsRepository; } protected Context(); static Context getInstance(); static Context setInstance(Context mContext); android.content.Context applicationContext(); Beneficiary... | Context { public DetailsRepository detailsRepository() { if (detailsRepository == null) { detailsRepository = new DetailsRepository(); } return detailsRepository; } protected Context(); static Context getInstance(); static Context setInstance(Context mContext); android.content.Context applicationContext(); Beneficiary... |
@Test public void testFormDataRepository() { context.assignbindtypes(); FormDataRepository formDataRepository = context.formDataRepository(); Assert.assertNotNull(formDataRepository); } | public FormDataRepository formDataRepository() { if (formDataRepository == null) { formDataRepository = new FormDataRepository(); } return formDataRepository; } | Context { public FormDataRepository formDataRepository() { if (formDataRepository == null) { formDataRepository = new FormDataRepository(); } return formDataRepository; } } | Context { public FormDataRepository formDataRepository() { if (formDataRepository == null) { formDataRepository = new FormDataRepository(); } return formDataRepository; } protected Context(); } | Context { public FormDataRepository formDataRepository() { if (formDataRepository == null) { formDataRepository = new FormDataRepository(); } return formDataRepository; } protected Context(); static Context getInstance(); static Context setInstance(Context mContext); android.content.Context applicationContext(); Benef... | Context { public FormDataRepository formDataRepository() { if (formDataRepository == null) { formDataRepository = new FormDataRepository(); } return formDataRepository; } protected Context(); static Context getInstance(); static Context setInstance(Context mContext); android.content.Context applicationContext(); Benef... |
@Test public void testAlertService() { AlertService alertService = context.alertService(); Assert.assertNotNull(alertService); } | public AlertService alertService() { if (alertService == null) { if (commonFtsObject() != null) { alertService = new AlertService(alertRepository(), commonFtsObject(), allCommonsRepositoryMap()); } else { alertService = new AlertService(alertRepository()); } } return alertService; } | Context { public AlertService alertService() { if (alertService == null) { if (commonFtsObject() != null) { alertService = new AlertService(alertRepository(), commonFtsObject(), allCommonsRepositoryMap()); } else { alertService = new AlertService(alertRepository()); } } return alertService; } } | Context { public AlertService alertService() { if (alertService == null) { if (commonFtsObject() != null) { alertService = new AlertService(alertRepository(), commonFtsObject(), allCommonsRepositoryMap()); } else { alertService = new AlertService(alertRepository()); } } return alertService; } protected Context(); } | Context { public AlertService alertService() { if (alertService == null) { if (commonFtsObject() != null) { alertService = new AlertService(alertRepository(), commonFtsObject(), allCommonsRepositoryMap()); } else { alertService = new AlertService(alertRepository()); } } return alertService; } protected Context(); stat... | Context { public AlertService alertService() { if (alertService == null) { if (commonFtsObject() != null) { alertService = new AlertService(alertRepository(), commonFtsObject(), allCommonsRepositoryMap()); } else { alertService = new AlertService(alertRepository()); } } return alertService; } protected Context(); stat... |
@Test public void testServiceProvidedService() { ServiceProvidedService serviceProvidedService = context.serviceProvidedService(); Assert.assertNotNull(serviceProvidedService); } | public ServiceProvidedService serviceProvidedService() { if (serviceProvidedService == null) { serviceProvidedService = new ServiceProvidedService(allServicesProvided()); } return serviceProvidedService; } | Context { public ServiceProvidedService serviceProvidedService() { if (serviceProvidedService == null) { serviceProvidedService = new ServiceProvidedService(allServicesProvided()); } return serviceProvidedService; } } | Context { public ServiceProvidedService serviceProvidedService() { if (serviceProvidedService == null) { serviceProvidedService = new ServiceProvidedService(allServicesProvided()); } return serviceProvidedService; } protected Context(); } | Context { public ServiceProvidedService serviceProvidedService() { if (serviceProvidedService == null) { serviceProvidedService = new ServiceProvidedService(allServicesProvided()); } return serviceProvidedService; } protected Context(); static Context getInstance(); static Context setInstance(Context mContext); androi... | Context { public ServiceProvidedService serviceProvidedService() { if (serviceProvidedService == null) { serviceProvidedService = new ServiceProvidedService(allServicesProvided()); } return serviceProvidedService; } protected Context(); static Context getInstance(); static Context setInstance(Context mContext); androi... |
@Test public void testEligibleCoupleService() { EligibleCoupleService eligibleCoupleService = context.eligibleCoupleService(); Assert.assertNotNull(eligibleCoupleService); } | public EligibleCoupleService eligibleCoupleService() { if (eligibleCoupleService == null) { eligibleCoupleService = new EligibleCoupleService(allEligibleCouples(), allTimelineEvents(), allBeneficiaries()); } return eligibleCoupleService; } | Context { public EligibleCoupleService eligibleCoupleService() { if (eligibleCoupleService == null) { eligibleCoupleService = new EligibleCoupleService(allEligibleCouples(), allTimelineEvents(), allBeneficiaries()); } return eligibleCoupleService; } } | Context { public EligibleCoupleService eligibleCoupleService() { if (eligibleCoupleService == null) { eligibleCoupleService = new EligibleCoupleService(allEligibleCouples(), allTimelineEvents(), allBeneficiaries()); } return eligibleCoupleService; } protected Context(); } | Context { public EligibleCoupleService eligibleCoupleService() { if (eligibleCoupleService == null) { eligibleCoupleService = new EligibleCoupleService(allEligibleCouples(), allTimelineEvents(), allBeneficiaries()); } return eligibleCoupleService; } protected Context(); static Context getInstance(); static Context set... | Context { public EligibleCoupleService eligibleCoupleService() { if (eligibleCoupleService == null) { eligibleCoupleService = new EligibleCoupleService(allEligibleCouples(), allTimelineEvents(), allBeneficiaries()); } return eligibleCoupleService; } protected Context(); static Context getInstance(); static Context set... |
@Test public void testShouldMigrateReturnsTrueForDBEncryptionVersionZero() { boolean shouldMigrate = CredentialsHelper.shouldMigrate(); Assert.assertTrue(shouldMigrate); } | public static boolean shouldMigrate() { return CoreLibrary.getInstance().context().allSharedPreferences().getDBEncryptionVersion() == 0 || (CoreLibrary.getInstance().context().allSharedPreferences().getDBEncryptionVersion() > 0 && BuildConfig.DB_ENCRYPTION_VERSION > CoreLibrary.getInstance().context().allSharedPreferen... | CredentialsHelper { public static boolean shouldMigrate() { return CoreLibrary.getInstance().context().allSharedPreferences().getDBEncryptionVersion() == 0 || (CoreLibrary.getInstance().context().allSharedPreferences().getDBEncryptionVersion() > 0 && BuildConfig.DB_ENCRYPTION_VERSION > CoreLibrary.getInstance().context... | CredentialsHelper { public static boolean shouldMigrate() { return CoreLibrary.getInstance().context().allSharedPreferences().getDBEncryptionVersion() == 0 || (CoreLibrary.getInstance().context().allSharedPreferences().getDBEncryptionVersion() > 0 && BuildConfig.DB_ENCRYPTION_VERSION > CoreLibrary.getInstance().context... | CredentialsHelper { public static boolean shouldMigrate() { return CoreLibrary.getInstance().context().allSharedPreferences().getDBEncryptionVersion() == 0 || (CoreLibrary.getInstance().context().allSharedPreferences().getDBEncryptionVersion() > 0 && BuildConfig.DB_ENCRYPTION_VERSION > CoreLibrary.getInstance().context... | CredentialsHelper { public static boolean shouldMigrate() { return CoreLibrary.getInstance().context().allSharedPreferences().getDBEncryptionVersion() == 0 || (CoreLibrary.getInstance().context().allSharedPreferences().getDBEncryptionVersion() > 0 && BuildConfig.DB_ENCRYPTION_VERSION > CoreLibrary.getInstance().context... |
@Test public void getClientForm() { ClientFormDTO clientFormDTO = new ClientFormDTO(); clientFormDTO.setId(1); clientFormDTO.setJson("[\"test json\"]"); ClientFormMetadataDTO clientFormMetadataDTO = new ClientFormMetadataDTO(); Date now = Calendar.getInstance().getTime(); clientFormMetadataDTO.setCreatedAt(now); client... | public ClientFormDTO getClientForm() { return clientForm; } | ClientFormResponse { public ClientFormDTO getClientForm() { return clientForm; } } | ClientFormResponse { public ClientFormDTO getClientForm() { return clientForm; } ClientFormResponse(ClientFormDTO clientForm, ClientFormMetadataDTO clientFormMetadata); } | ClientFormResponse { public ClientFormDTO getClientForm() { return clientForm; } ClientFormResponse(ClientFormDTO clientForm, ClientFormMetadataDTO clientFormMetadata); ClientFormDTO getClientForm(); void setClientForm(ClientFormDTO clientForm); ClientFormMetadataDTO getClientFormMetadata(); void setClientFormMetadata(... | ClientFormResponse { public ClientFormDTO getClientForm() { return clientForm; } ClientFormResponse(ClientFormDTO clientForm, ClientFormMetadataDTO clientFormMetadata); ClientFormDTO getClientForm(); void setClientForm(ClientFormDTO clientForm); ClientFormMetadataDTO getClientFormMetadata(); void setClientFormMetadata(... |
@Test public void testmotherService() { MotherService motherService = context.motherService(); Assert.assertNotNull(motherService); } | public MotherService motherService() { if (motherService == null) { motherService = new MotherService(allBeneficiaries(), allEligibleCouples(), allTimelineEvents(), serviceProvidedService()); } return motherService; } | Context { public MotherService motherService() { if (motherService == null) { motherService = new MotherService(allBeneficiaries(), allEligibleCouples(), allTimelineEvents(), serviceProvidedService()); } return motherService; } } | Context { public MotherService motherService() { if (motherService == null) { motherService = new MotherService(allBeneficiaries(), allEligibleCouples(), allTimelineEvents(), serviceProvidedService()); } return motherService; } protected Context(); } | Context { public MotherService motherService() { if (motherService == null) { motherService = new MotherService(allBeneficiaries(), allEligibleCouples(), allTimelineEvents(), serviceProvidedService()); } return motherService; } protected Context(); static Context getInstance(); static Context setInstance(Context mCont... | Context { public MotherService motherService() { if (motherService == null) { motherService = new MotherService(allBeneficiaries(), allEligibleCouples(), allTimelineEvents(), serviceProvidedService()); } return motherService; } protected Context(); static Context getInstance(); static Context setInstance(Context mCont... |
@Test public void testChildService() { ChildService childService = context.childService(); Assert.assertNotNull(childService); } | public ChildService childService() { if (childService == null) { childService = new ChildService(allBeneficiaries(), motherRepository(), childRepository(), allTimelineEvents(), serviceProvidedService(), allAlerts()); } return childService; } | Context { public ChildService childService() { if (childService == null) { childService = new ChildService(allBeneficiaries(), motherRepository(), childRepository(), allTimelineEvents(), serviceProvidedService(), allAlerts()); } return childService; } } | Context { public ChildService childService() { if (childService == null) { childService = new ChildService(allBeneficiaries(), motherRepository(), childRepository(), allTimelineEvents(), serviceProvidedService(), allAlerts()); } return childService; } protected Context(); } | Context { public ChildService childService() { if (childService == null) { childService = new ChildService(allBeneficiaries(), motherRepository(), childRepository(), allTimelineEvents(), serviceProvidedService(), allAlerts()); } return childService; } protected Context(); static Context getInstance(); static Context s... | Context { public ChildService childService() { if (childService == null) { childService = new ChildService(allBeneficiaries(), motherRepository(), childRepository(), allTimelineEvents(), serviceProvidedService(), allAlerts()); } return childService; } protected Context(); static Context getInstance(); static Context s... |
@Test public void testPendingFormSubmissionService() { context.assignbindtypes(); PendingFormSubmissionService pendingFormSubmissionService = context.pendingFormSubmissionService(); Assert.assertNotNull(pendingFormSubmissionService); } | public PendingFormSubmissionService pendingFormSubmissionService() { if (pendingFormSubmissionService == null) { pendingFormSubmissionService = new PendingFormSubmissionService(formDataRepository()); } return pendingFormSubmissionService; } | Context { public PendingFormSubmissionService pendingFormSubmissionService() { if (pendingFormSubmissionService == null) { pendingFormSubmissionService = new PendingFormSubmissionService(formDataRepository()); } return pendingFormSubmissionService; } } | Context { public PendingFormSubmissionService pendingFormSubmissionService() { if (pendingFormSubmissionService == null) { pendingFormSubmissionService = new PendingFormSubmissionService(formDataRepository()); } return pendingFormSubmissionService; } protected Context(); } | Context { public PendingFormSubmissionService pendingFormSubmissionService() { if (pendingFormSubmissionService == null) { pendingFormSubmissionService = new PendingFormSubmissionService(formDataRepository()); } return pendingFormSubmissionService; } protected Context(); static Context getInstance(); static Context se... | Context { public PendingFormSubmissionService pendingFormSubmissionService() { if (pendingFormSubmissionService == null) { pendingFormSubmissionService = new PendingFormSubmissionService(formDataRepository()); } return pendingFormSubmissionService; } protected Context(); static Context getInstance(); static Context se... |
@Test public void testLocationRepository() { LocationRepository locationRepository = context.getLocationRepository(); Assert.assertNotNull(locationRepository); } | public LocationRepository getLocationRepository() { if (locationRepository == null) { locationRepository = new LocationRepository(); } return locationRepository; } | Context { public LocationRepository getLocationRepository() { if (locationRepository == null) { locationRepository = new LocationRepository(); } return locationRepository; } } | Context { public LocationRepository getLocationRepository() { if (locationRepository == null) { locationRepository = new LocationRepository(); } return locationRepository; } protected Context(); } | Context { public LocationRepository getLocationRepository() { if (locationRepository == null) { locationRepository = new LocationRepository(); } return locationRepository; } protected Context(); static Context getInstance(); static Context setInstance(Context mContext); android.content.Context applicationContext(); Be... | Context { public LocationRepository getLocationRepository() { if (locationRepository == null) { locationRepository = new LocationRepository(); } return locationRepository; } protected Context(); static Context getInstance(); static Context setInstance(Context mContext); android.content.Context applicationContext(); Be... |
@Test public void testGetLocationTagRepository() { LocationTagRepository locationTagRepository = context.getLocationTagRepository(); Assert.assertNotNull(locationTagRepository); } | public LocationTagRepository getLocationTagRepository() { if (locationTagRepository == null) { locationTagRepository = new LocationTagRepository(); } return locationTagRepository; } | Context { public LocationTagRepository getLocationTagRepository() { if (locationTagRepository == null) { locationTagRepository = new LocationTagRepository(); } return locationTagRepository; } } | Context { public LocationTagRepository getLocationTagRepository() { if (locationTagRepository == null) { locationTagRepository = new LocationTagRepository(); } return locationTagRepository; } protected Context(); } | Context { public LocationTagRepository getLocationTagRepository() { if (locationTagRepository == null) { locationTagRepository = new LocationTagRepository(); } return locationTagRepository; } protected Context(); static Context getInstance(); static Context setInstance(Context mContext); android.content.Context applic... | Context { public LocationTagRepository getLocationTagRepository() { if (locationTagRepository == null) { locationTagRepository = new LocationTagRepository(); } return locationTagRepository; } protected Context(); static Context getInstance(); static Context setInstance(Context mContext); android.content.Context applic... |
@Test public void testGetStructureRepository() { StructureRepository structureRepository = context.getStructureRepository(); Assert.assertNotNull(structureRepository); } | public StructureRepository getStructureRepository() { if (structureRepository == null) { structureRepository = new StructureRepository(); } return structureRepository; } | Context { public StructureRepository getStructureRepository() { if (structureRepository == null) { structureRepository = new StructureRepository(); } return structureRepository; } } | Context { public StructureRepository getStructureRepository() { if (structureRepository == null) { structureRepository = new StructureRepository(); } return structureRepository; } protected Context(); } | Context { public StructureRepository getStructureRepository() { if (structureRepository == null) { structureRepository = new StructureRepository(); } return structureRepository; } protected Context(); static Context getInstance(); static Context setInstance(Context mContext); android.content.Context applicationContext... | Context { public StructureRepository getStructureRepository() { if (structureRepository == null) { structureRepository = new StructureRepository(); } return structureRepository; } protected Context(); static Context getInstance(); static Context setInstance(Context mContext); android.content.Context applicationContext... |
@Test public void testGetPlanDefinitionRepository() { PlanDefinitionRepository planDefinitionRepository = context.getPlanDefinitionRepository(); Assert.assertNotNull(planDefinitionRepository); } | public PlanDefinitionRepository getPlanDefinitionRepository() { if (planDefinitionRepository == null) { planDefinitionRepository = new PlanDefinitionRepository(); } return planDefinitionRepository; } | Context { public PlanDefinitionRepository getPlanDefinitionRepository() { if (planDefinitionRepository == null) { planDefinitionRepository = new PlanDefinitionRepository(); } return planDefinitionRepository; } } | Context { public PlanDefinitionRepository getPlanDefinitionRepository() { if (planDefinitionRepository == null) { planDefinitionRepository = new PlanDefinitionRepository(); } return planDefinitionRepository; } protected Context(); } | Context { public PlanDefinitionRepository getPlanDefinitionRepository() { if (planDefinitionRepository == null) { planDefinitionRepository = new PlanDefinitionRepository(); } return planDefinitionRepository; } protected Context(); static Context getInstance(); static Context setInstance(Context mContext); android.cont... | Context { public PlanDefinitionRepository getPlanDefinitionRepository() { if (planDefinitionRepository == null) { planDefinitionRepository = new PlanDefinitionRepository(); } return planDefinitionRepository; } protected Context(); static Context getInstance(); static Context setInstance(Context mContext); android.cont... |
@Test public void testGetManifestRepository() { ManifestRepository manifestRepository = context.getManifestRepository(); Assert.assertNotNull(manifestRepository); } | public ManifestRepository getManifestRepository() { if (manifestRepository == null) { manifestRepository = new ManifestRepository(); } return manifestRepository; } | Context { public ManifestRepository getManifestRepository() { if (manifestRepository == null) { manifestRepository = new ManifestRepository(); } return manifestRepository; } } | Context { public ManifestRepository getManifestRepository() { if (manifestRepository == null) { manifestRepository = new ManifestRepository(); } return manifestRepository; } protected Context(); } | Context { public ManifestRepository getManifestRepository() { if (manifestRepository == null) { manifestRepository = new ManifestRepository(); } return manifestRepository; } protected Context(); static Context getInstance(); static Context setInstance(Context mContext); android.content.Context applicationContext(); Be... | Context { public ManifestRepository getManifestRepository() { if (manifestRepository == null) { manifestRepository = new ManifestRepository(); } return manifestRepository; } protected Context(); static Context getInstance(); static Context setInstance(Context mContext); android.content.Context applicationContext(); Be... |
@Test public void testGetClientFormRepository() { ClientFormRepository clientFormRepository = context.getClientFormRepository(); Assert.assertNotNull(clientFormRepository); } | public ClientFormRepository getClientFormRepository() { if (clientFormRepository == null) { clientFormRepository = new ClientFormRepository(); } return clientFormRepository; } | Context { public ClientFormRepository getClientFormRepository() { if (clientFormRepository == null) { clientFormRepository = new ClientFormRepository(); } return clientFormRepository; } } | Context { public ClientFormRepository getClientFormRepository() { if (clientFormRepository == null) { clientFormRepository = new ClientFormRepository(); } return clientFormRepository; } protected Context(); } | Context { public ClientFormRepository getClientFormRepository() { if (clientFormRepository == null) { clientFormRepository = new ClientFormRepository(); } return clientFormRepository; } protected Context(); static Context getInstance(); static Context setInstance(Context mContext); android.content.Context applicationC... | Context { public ClientFormRepository getClientFormRepository() { if (clientFormRepository == null) { clientFormRepository = new ClientFormRepository(); } return clientFormRepository; } protected Context(); static Context getInstance(); static Context setInstance(Context mContext); android.content.Context applicationC... |
@Test public void ShouldShowcount() throws Exception { when(personRepository.count()).thenReturn((long) 8); assertEquals(personRepository.count(), (long) 8); } | public long count() { return personRepository.count(); } | AllCommonsRepository { public long count() { return personRepository.count(); } } | AllCommonsRepository { public long count() { return personRepository.count(); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRepository); } | AllCommonsRepository { public long count() { return personRepository.count(); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRepository); List<CommonPersonObject> all(); CommonPersonObject findByCaseID(String caseId); CommonPer... | AllCommonsRepository { public long count() { return personRepository.count(); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRepository); List<CommonPersonObject> all(); CommonPersonObject findByCaseID(String caseId); CommonPer... |
@Test public void testGetCredentialsInvokesGetDecryptedPassphraseValueWithCorrectValuesForDBAuth() { credentialsHelper.getCredentials(TEST_USERNAME, CredentialsHelper.CREDENTIALS_TYPE.DB_AUTH); ArgumentCaptor<String> usernameArgCaptor = ArgumentCaptor.forClass(String.class); Mockito.verify(userService, Mockito.times(1)... | public byte[] getCredentials(String username, String type) { if (CREDENTIALS_TYPE.DB_AUTH.equals(type)) { return context.userService().getDecryptedPassphraseValue(username); } else if (CREDENTIALS_TYPE.LOCAL_AUTH.equals(type)) { return context.userService().getDecryptedAccountValue(username, AccountHelper.INTENT_KEY.AC... | CredentialsHelper { public byte[] getCredentials(String username, String type) { if (CREDENTIALS_TYPE.DB_AUTH.equals(type)) { return context.userService().getDecryptedPassphraseValue(username); } else if (CREDENTIALS_TYPE.LOCAL_AUTH.equals(type)) { return context.userService().getDecryptedAccountValue(username, Account... | CredentialsHelper { public byte[] getCredentials(String username, String type) { if (CREDENTIALS_TYPE.DB_AUTH.equals(type)) { return context.userService().getDecryptedPassphraseValue(username); } else if (CREDENTIALS_TYPE.LOCAL_AUTH.equals(type)) { return context.userService().getDecryptedAccountValue(username, Account... | CredentialsHelper { public byte[] getCredentials(String username, String type) { if (CREDENTIALS_TYPE.DB_AUTH.equals(type)) { return context.userService().getDecryptedPassphraseValue(username); } else if (CREDENTIALS_TYPE.LOCAL_AUTH.equals(type)) { return context.userService().getDecryptedAccountValue(username, Account... | CredentialsHelper { public byte[] getCredentials(String username, String type) { if (CREDENTIALS_TYPE.DB_AUTH.equals(type)) { return context.userService().getDecryptedPassphraseValue(username); } else if (CREDENTIALS_TYPE.LOCAL_AUTH.equals(type)) { return context.userService().getDecryptedAccountValue(username, Account... |
@Test public void testAll() { allCommonsRepository.all(); verify(personRepository).allcommon(); } | public List<CommonPersonObject> all() { return personRepository.allcommon(); } | AllCommonsRepository { public List<CommonPersonObject> all() { return personRepository.allcommon(); } } | AllCommonsRepository { public List<CommonPersonObject> all() { return personRepository.allcommon(); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRepository); } | AllCommonsRepository { public List<CommonPersonObject> all() { return personRepository.allcommon(); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRepository); List<CommonPersonObject> all(); CommonPersonObject findByCaseID(Str... | AllCommonsRepository { public List<CommonPersonObject> all() { return personRepository.allcommon(); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRepository); List<CommonPersonObject> all(); CommonPersonObject findByCaseID(Str... |
@Test public void testFindByCaseId() { allCommonsRepository.findByCaseID("case 1"); verify(personRepository).findByCaseID("case 1"); } | public CommonPersonObject findByCaseID(String caseId) { return personRepository.findByCaseID(caseId); } | AllCommonsRepository { public CommonPersonObject findByCaseID(String caseId) { return personRepository.findByCaseID(caseId); } } | AllCommonsRepository { public CommonPersonObject findByCaseID(String caseId) { return personRepository.findByCaseID(caseId); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRepository); } | AllCommonsRepository { public CommonPersonObject findByCaseID(String caseId) { return personRepository.findByCaseID(caseId); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRepository); List<CommonPersonObject> all(); CommonPers... | AllCommonsRepository { public CommonPersonObject findByCaseID(String caseId) { return personRepository.findByCaseID(caseId); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRepository); List<CommonPersonObject> all(); CommonPers... |
@Test public void testFindHHByGOBHHID() { allCommonsRepository.findHHByGOBHHID("gobhhid 1"); verify(personRepository).findHHByGOBHHID("gobhhid 1"); } | public CommonPersonObject findHHByGOBHHID(String gobhhid) { return personRepository.findHHByGOBHHID(gobhhid); } | AllCommonsRepository { public CommonPersonObject findHHByGOBHHID(String gobhhid) { return personRepository.findHHByGOBHHID(gobhhid); } } | AllCommonsRepository { public CommonPersonObject findHHByGOBHHID(String gobhhid) { return personRepository.findHHByGOBHHID(gobhhid); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRepository); } | AllCommonsRepository { public CommonPersonObject findHHByGOBHHID(String gobhhid) { return personRepository.findHHByGOBHHID(gobhhid); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRepository); List<CommonPersonObject> all(); Co... | AllCommonsRepository { public CommonPersonObject findHHByGOBHHID(String gobhhid) { return personRepository.findHHByGOBHHID(gobhhid); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRepository); List<CommonPersonObject> all(); Co... |
@Test public void testCount() { allCommonsRepository.count(); verify(personRepository).count(); } | public long count() { return personRepository.count(); } | AllCommonsRepository { public long count() { return personRepository.count(); } } | AllCommonsRepository { public long count() { return personRepository.count(); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRepository); } | AllCommonsRepository { public long count() { return personRepository.count(); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRepository); List<CommonPersonObject> all(); CommonPersonObject findByCaseID(String caseId); CommonPer... | AllCommonsRepository { public long count() { return personRepository.count(); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRepository); List<CommonPersonObject> all(); CommonPersonObject findByCaseID(String caseId); CommonPer... |
@Test public void testFindByCaseIds() { List<String> expectedCaseIds = new ArrayList<>(); expectedCaseIds.add("case 1"); expectedCaseIds.add("case 2"); allCommonsRepository.findByCaseIDs(expectedCaseIds); verify(personRepository).findByCaseIDs(new String[] {expectedCaseIds.get(0), expectedCaseIds.get(1)}); } | public List<CommonPersonObject> findByCaseIDs(List<String> caseIds) { return personRepository.findByCaseIDs(caseIds.toArray(new String[caseIds.size()])); } | AllCommonsRepository { public List<CommonPersonObject> findByCaseIDs(List<String> caseIds) { return personRepository.findByCaseIDs(caseIds.toArray(new String[caseIds.size()])); } } | AllCommonsRepository { public List<CommonPersonObject> findByCaseIDs(List<String> caseIds) { return personRepository.findByCaseIDs(caseIds.toArray(new String[caseIds.size()])); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRep... | AllCommonsRepository { public List<CommonPersonObject> findByCaseIDs(List<String> caseIds) { return personRepository.findByCaseIDs(caseIds.toArray(new String[caseIds.size()])); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRep... | AllCommonsRepository { public List<CommonPersonObject> findByCaseIDs(List<String> caseIds) { return personRepository.findByCaseIDs(caseIds.toArray(new String[caseIds.size()])); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRep... |
@Test public void testFindByRelationIds() { List<String> expectedRelationIds = new ArrayList<>(); expectedRelationIds.add("relation id 1"); expectedRelationIds.add("relation id 2"); allCommonsRepository.findByRelationalIDs(expectedRelationIds); verify(personRepository).findByRelationalIDs(new String[] {expectedRelation... | public List<CommonPersonObject> findByRelationalIDs(List<String> RelationalID) { return personRepository .findByRelationalIDs(RelationalID.toArray(new String[RelationalID.size()])); } | AllCommonsRepository { public List<CommonPersonObject> findByRelationalIDs(List<String> RelationalID) { return personRepository .findByRelationalIDs(RelationalID.toArray(new String[RelationalID.size()])); } } | AllCommonsRepository { public List<CommonPersonObject> findByRelationalIDs(List<String> RelationalID) { return personRepository .findByRelationalIDs(RelationalID.toArray(new String[RelationalID.size()])); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEven... | AllCommonsRepository { public List<CommonPersonObject> findByRelationalIDs(List<String> RelationalID) { return personRepository .findByRelationalIDs(RelationalID.toArray(new String[RelationalID.size()])); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEven... | AllCommonsRepository { public List<CommonPersonObject> findByRelationalIDs(List<String> RelationalID) { return personRepository .findByRelationalIDs(RelationalID.toArray(new String[RelationalID.size()])); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEven... |
@Test public void testFindByRelationIds2() { List<String> expectedRelationIds = new ArrayList<>(); expectedRelationIds.add("relation id 1"); expectedRelationIds.add("relation id 2"); allCommonsRepository.findByRelational_IDs(expectedRelationIds); verify(personRepository).findByRelational_IDs(new String[] {expectedRelat... | public List<CommonPersonObject> findByRelational_IDs(List<String> RelationalID) { return personRepository .findByRelational_IDs(RelationalID.toArray(new String[RelationalID.size()])); } | AllCommonsRepository { public List<CommonPersonObject> findByRelational_IDs(List<String> RelationalID) { return personRepository .findByRelational_IDs(RelationalID.toArray(new String[RelationalID.size()])); } } | AllCommonsRepository { public List<CommonPersonObject> findByRelational_IDs(List<String> RelationalID) { return personRepository .findByRelational_IDs(RelationalID.toArray(new String[RelationalID.size()])); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEv... | AllCommonsRepository { public List<CommonPersonObject> findByRelational_IDs(List<String> RelationalID) { return personRepository .findByRelational_IDs(RelationalID.toArray(new String[RelationalID.size()])); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEv... | AllCommonsRepository { public List<CommonPersonObject> findByRelational_IDs(List<String> RelationalID) { return personRepository .findByRelational_IDs(RelationalID.toArray(new String[RelationalID.size()])); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEv... |
@Test public void testClose() { String entityId = "Entity 1"; allCommonsRepository.close(entityId); verify(alertRepository).deleteAllAlertsForEntity(entityId); verify(timelineEventRepository).deleteAllTimelineEventsForEntity(entityId); verify(personRepository).close(entityId); } | public void close(String entityId) { alertRepository.deleteAllAlertsForEntity(entityId); timelineEventRepository.deleteAllTimelineEventsForEntity(entityId); personRepository.close(entityId); } | AllCommonsRepository { public void close(String entityId) { alertRepository.deleteAllAlertsForEntity(entityId); timelineEventRepository.deleteAllTimelineEventsForEntity(entityId); personRepository.close(entityId); } } | AllCommonsRepository { public void close(String entityId) { alertRepository.deleteAllAlertsForEntity(entityId); timelineEventRepository.deleteAllTimelineEventsForEntity(entityId); personRepository.close(entityId); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, Tim... | AllCommonsRepository { public void close(String entityId) { alertRepository.deleteAllAlertsForEntity(entityId); timelineEventRepository.deleteAllTimelineEventsForEntity(entityId); personRepository.close(entityId); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, Tim... | AllCommonsRepository { public void close(String entityId) { alertRepository.deleteAllAlertsForEntity(entityId); timelineEventRepository.deleteAllTimelineEventsForEntity(entityId); personRepository.close(entityId); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, Tim... |
@Test public void testMergeDetails() { String entityId = "Entity 1"; Map<String, String> details = new HashMap<>(); details.put("case id", "Case 1"); allCommonsRepository.mergeDetails(entityId, details); verify(personRepository).mergeDetails(entityId, details); } | public void mergeDetails(String entityId, Map<String, String> details) { personRepository.mergeDetails(entityId, details); } | AllCommonsRepository { public void mergeDetails(String entityId, Map<String, String> details) { personRepository.mergeDetails(entityId, details); } } | AllCommonsRepository { public void mergeDetails(String entityId, Map<String, String> details) { personRepository.mergeDetails(entityId, details); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRepository); } | AllCommonsRepository { public void mergeDetails(String entityId, Map<String, String> details) { personRepository.mergeDetails(entityId, details); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRepository); List<CommonPersonObje... | AllCommonsRepository { public void mergeDetails(String entityId, Map<String, String> details) { personRepository.mergeDetails(entityId, details); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRepository); List<CommonPersonObje... |
@Test public void testUpdate() { String tableName = "sprayed_structures"; String caseId = "Case 1"; ContentValues contentValues = new ContentValues(); contentValues.put("status", "Ready"); allCommonsRepository.update(tableName, contentValues, caseId); verify(personRepository).updateColumn(tableName,contentValues,caseId... | public void update(String tableName, ContentValues contentValues, String caseId) { personRepository.updateColumn(tableName, contentValues, caseId); } | AllCommonsRepository { public void update(String tableName, ContentValues contentValues, String caseId) { personRepository.updateColumn(tableName, contentValues, caseId); } } | AllCommonsRepository { public void update(String tableName, ContentValues contentValues, String caseId) { personRepository.updateColumn(tableName, contentValues, caseId); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRepositor... | AllCommonsRepository { public void update(String tableName, ContentValues contentValues, String caseId) { personRepository.updateColumn(tableName, contentValues, caseId); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRepositor... | AllCommonsRepository { public void update(String tableName, ContentValues contentValues, String caseId) { personRepository.updateColumn(tableName, contentValues, caseId); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRepositor... |
@Test public void testGetCredentialsInvokesGetDecryptedPassphraseValueWithCorrectValuesForLocalAuth() { credentialsHelper.getCredentials(TEST_USERNAME, CredentialsHelper.CREDENTIALS_TYPE.LOCAL_AUTH); ArgumentCaptor<String> usernameArgCaptor = ArgumentCaptor.forClass(String.class); ArgumentCaptor<String> keyArgCaptor = ... | public byte[] getCredentials(String username, String type) { if (CREDENTIALS_TYPE.DB_AUTH.equals(type)) { return context.userService().getDecryptedPassphraseValue(username); } else if (CREDENTIALS_TYPE.LOCAL_AUTH.equals(type)) { return context.userService().getDecryptedAccountValue(username, AccountHelper.INTENT_KEY.AC... | CredentialsHelper { public byte[] getCredentials(String username, String type) { if (CREDENTIALS_TYPE.DB_AUTH.equals(type)) { return context.userService().getDecryptedPassphraseValue(username); } else if (CREDENTIALS_TYPE.LOCAL_AUTH.equals(type)) { return context.userService().getDecryptedAccountValue(username, Account... | CredentialsHelper { public byte[] getCredentials(String username, String type) { if (CREDENTIALS_TYPE.DB_AUTH.equals(type)) { return context.userService().getDecryptedPassphraseValue(username); } else if (CREDENTIALS_TYPE.LOCAL_AUTH.equals(type)) { return context.userService().getDecryptedAccountValue(username, Account... | CredentialsHelper { public byte[] getCredentials(String username, String type) { if (CREDENTIALS_TYPE.DB_AUTH.equals(type)) { return context.userService().getDecryptedPassphraseValue(username); } else if (CREDENTIALS_TYPE.LOCAL_AUTH.equals(type)) { return context.userService().getDecryptedAccountValue(username, Account... | CredentialsHelper { public byte[] getCredentials(String username, String type) { if (CREDENTIALS_TYPE.DB_AUTH.equals(type)) { return context.userService().getDecryptedPassphraseValue(username); } else if (CREDENTIALS_TYPE.LOCAL_AUTH.equals(type)) { return context.userService().getDecryptedAccountValue(username, Account... |
@Test public void testCustomQuery() { String tableName = "sprayed_structures"; String sql = "SELECT count(*) FROM sprayed_structures WHERE status = ?"; String[] selectionArgs = {"Complete"}; allCommonsRepository.customQuery(sql, selectionArgs, tableName); verify(personRepository).customQuery(sql, selectionArgs, tableNa... | public List<CommonPersonObject> customQuery(String sql, String[] selections, String tableName) { return personRepository.customQuery(sql, selections, tableName); } | AllCommonsRepository { public List<CommonPersonObject> customQuery(String sql, String[] selections, String tableName) { return personRepository.customQuery(sql, selections, tableName); } } | AllCommonsRepository { public List<CommonPersonObject> customQuery(String sql, String[] selections, String tableName) { return personRepository.customQuery(sql, selections, tableName); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timeline... | AllCommonsRepository { public List<CommonPersonObject> customQuery(String sql, String[] selections, String tableName) { return personRepository.customQuery(sql, selections, tableName); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timeline... | AllCommonsRepository { public List<CommonPersonObject> customQuery(String sql, String[] selections, String tableName) { return personRepository.customQuery(sql, selections, tableName); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timeline... |
@Test public void testCustomQueryForCompleteRow() { String tableName = "sprayed_structures"; String sql = "SELECT count(*) FROM sprayed_structures WHERE status = ?"; String[] selectionArgs = {"Complete"}; allCommonsRepository.customQueryForCompleteRow(sql, selectionArgs, tableName); verify(personRepository).customQuery... | public List<CommonPersonObject> customQueryForCompleteRow(String sql, String[] selections, String tableName) { return personRepository.customQueryForCompleteRow(sql, selections, tableName); } | AllCommonsRepository { public List<CommonPersonObject> customQueryForCompleteRow(String sql, String[] selections, String tableName) { return personRepository.customQueryForCompleteRow(sql, selections, tableName); } } | AllCommonsRepository { public List<CommonPersonObject> customQueryForCompleteRow(String sql, String[] selections, String tableName) { return personRepository.customQueryForCompleteRow(sql, selections, tableName); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, Time... | AllCommonsRepository { public List<CommonPersonObject> customQueryForCompleteRow(String sql, String[] selections, String tableName) { return personRepository.customQueryForCompleteRow(sql, selections, tableName); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, Time... | AllCommonsRepository { public List<CommonPersonObject> customQueryForCompleteRow(String sql, String[] selections, String tableName) { return personRepository.customQueryForCompleteRow(sql, selections, tableName); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, Time... |
@Test public void testUpdateSearchWithListToRemove() { String caseId = "Case id 1"; String field = "status"; String value = "synced"; String[] listToremove = {"created", "deleted"}; allCommonsRepository.updateSearch(caseId,field,value,listToremove); verify(personRepository).populateSearchValues(caseId,field,value,listT... | public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues contentValues = personRepo... | AllCommonsRepository { public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues con... | AllCommonsRepository { public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues con... | AllCommonsRepository { public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues con... | AllCommonsRepository { public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues con... |
@Test public void testUpdateSearchWithListToRemoveMissingCaseId() { allCommonsRepository.updateSearch(null,"status","synced",new String[]{"created", "deleted"}); verifyZeroInteractions(personRepository); } | public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues contentValues = personRepo... | AllCommonsRepository { public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues con... | AllCommonsRepository { public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues con... | AllCommonsRepository { public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues con... | AllCommonsRepository { public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues con... |
@Test public void testDeleteSearchRecord() { String caseId = "Case id 1"; allCommonsRepository.deleteSearchRecord(caseId); verify(personRepository).deleteSearchRecord(caseId); } | public boolean deleteSearchRecord(String caseId) { if (StringUtils.isBlank(caseId)) { return false; } return personRepository.deleteSearchRecord(caseId); } | AllCommonsRepository { public boolean deleteSearchRecord(String caseId) { if (StringUtils.isBlank(caseId)) { return false; } return personRepository.deleteSearchRecord(caseId); } } | AllCommonsRepository { public boolean deleteSearchRecord(String caseId) { if (StringUtils.isBlank(caseId)) { return false; } return personRepository.deleteSearchRecord(caseId); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRep... | AllCommonsRepository { public boolean deleteSearchRecord(String caseId) { if (StringUtils.isBlank(caseId)) { return false; } return personRepository.deleteSearchRecord(caseId); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRep... | AllCommonsRepository { public boolean deleteSearchRecord(String caseId) { if (StringUtils.isBlank(caseId)) { return false; } return personRepository.deleteSearchRecord(caseId); } AllCommonsRepository(CommonRepository personRepository, AlertRepository
alertRepository, TimelineEventRepository timelineEventRep... |
@Test public void testUpdateSearchWithNoCaseId() { allCommonsRepository.updateSearch(""); verifyZeroInteractions(personRepository); } | public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues contentValues = personRepo... | AllCommonsRepository { public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues con... | AllCommonsRepository { public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues con... | AllCommonsRepository { public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues con... | AllCommonsRepository { public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues con... |
@Test public void testUpdateSearchWithCaseId() { String caseId = "Case id 1"; ContentValues contentValues = new ContentValues(); contentValues.put("status", "Ready"); when(personRepository.populateSearchValues(caseId)).thenReturn(contentValues); allCommonsRepository.updateSearch(caseId); verify(personRepository).search... | public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues contentValues = personRepo... | AllCommonsRepository { public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues con... | AllCommonsRepository { public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues con... | AllCommonsRepository { public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues con... | AllCommonsRepository { public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues con... |
@Test public void testUpdateSearchWithNoCaseIdList() { allCommonsRepository.updateSearch(new ArrayList<>()); verifyZeroInteractions(personRepository); } | public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues contentValues = personRepo... | AllCommonsRepository { public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues con... | AllCommonsRepository { public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues con... | AllCommonsRepository { public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues con... | AllCommonsRepository { public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues con... |
@Test public void testUpdateSearchWithCaseIdList() { String caseId1 = "Case id 1"; String caseId2 = "Case id 2"; List<String> caseIdList = new ArrayList<>(); caseIdList.add(caseId1); caseIdList.add(caseId2); ContentValues contentValues1 = new ContentValues(); contentValues1.put("status", "Ready"); doReturn(contentValue... | public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues contentValues = personRepo... | AllCommonsRepository { public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues con... | AllCommonsRepository { public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues con... | AllCommonsRepository { public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues con... | AllCommonsRepository { public List<String> updateSearch(List<String> caseIds) { List<String> remainingIds = new ArrayList<>(); if (caseIds == null || caseIds.isEmpty()) { return remainingIds; } Map<String, ContentValues> searchMap = new HashMap<String, ContentValues>(); for (String caseId : caseIds) { ContentValues con... |
@Test public void addCallsDatabaseInsert1times() throws Exception { String tablename = ""; String[] tableColumns = new String[]{}; commonRepository = new CommonRepository(tablename, tableColumns); repository = Mockito.mock(Repository.class); sqliteDatabase = Mockito.mock(SQLiteDatabase.class); Mockito.when(repository.g... | public void add(CommonPersonObject common) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.insert(TABLE_NAME, null, createValuesFor(common)); } | CommonRepository extends DrishtiRepository { public void add(CommonPersonObject common) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.insert(TABLE_NAME, null, createValuesFor(common)); } } | CommonRepository extends DrishtiRepository { public void add(CommonPersonObject common) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.insert(TABLE_NAME, null, createValuesFor(common)); } CommonRepository(String tablename, String[] columns); CommonRepository(CommonFtsObject commonFtsObjec... | CommonRepository extends DrishtiRepository { public void add(CommonPersonObject common) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.insert(TABLE_NAME, null, createValuesFor(common)); } CommonRepository(String tablename, String[] columns); CommonRepository(CommonFtsObject commonFtsObjec... | CommonRepository extends DrishtiRepository { public void add(CommonPersonObject common) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.insert(TABLE_NAME, null, createValuesFor(common)); } CommonRepository(String tablename, String[] columns); CommonRepository(CommonFtsObject commonFtsObjec... |
@Test public void testSaveCredentialsUpdatesSharedPreferencesWithEncryptedPassphrase() { Mockito.doReturn(syncConfiguration).when(coreLibrary).getSyncConfiguration(); Mockito.doReturn(SyncFilter.TEAM_ID).when(syncConfiguration).getEncryptionParam(); credentialsHelper.saveCredentials(CredentialsHelper.CREDENTIALS_TYPE.D... | public void saveCredentials(String type, String encryptedPassphrase) { if (CREDENTIALS_TYPE.DB_AUTH.equals(type)) { allSharedPreferences.savePassphrase(encryptedPassphrase, CoreLibrary.getInstance().getSyncConfiguration().getEncryptionParam().name()); allSharedPreferences.setDBEncryptionVersion(BuildConfig.DB_ENCRYPTIO... | CredentialsHelper { public void saveCredentials(String type, String encryptedPassphrase) { if (CREDENTIALS_TYPE.DB_AUTH.equals(type)) { allSharedPreferences.savePassphrase(encryptedPassphrase, CoreLibrary.getInstance().getSyncConfiguration().getEncryptionParam().name()); allSharedPreferences.setDBEncryptionVersion(Buil... | CredentialsHelper { public void saveCredentials(String type, String encryptedPassphrase) { if (CREDENTIALS_TYPE.DB_AUTH.equals(type)) { allSharedPreferences.savePassphrase(encryptedPassphrase, CoreLibrary.getInstance().getSyncConfiguration().getEncryptionParam().name()); allSharedPreferences.setDBEncryptionVersion(Buil... | CredentialsHelper { public void saveCredentials(String type, String encryptedPassphrase) { if (CREDENTIALS_TYPE.DB_AUTH.equals(type)) { allSharedPreferences.savePassphrase(encryptedPassphrase, CoreLibrary.getInstance().getSyncConfiguration().getEncryptionParam().name()); allSharedPreferences.setDBEncryptionVersion(Buil... | CredentialsHelper { public void saveCredentials(String type, String encryptedPassphrase) { if (CREDENTIALS_TYPE.DB_AUTH.equals(type)) { allSharedPreferences.savePassphrase(encryptedPassphrase, CoreLibrary.getInstance().getSyncConfiguration().getEncryptionParam().name()); allSharedPreferences.setDBEncryptionVersion(Buil... |
@Test public void findByCaseIDCallsDatabaseQuery1times() throws Exception { String[] columns = new String[]{"id", "relationalid", "details", "is_closed"}; MatrixCursor matrixCursor = new MatrixCursor(columns); matrixCursor.addRow(new Object[]{"caseID", "relationalID", new HashMap<String, String>(), 0}); String tablenam... | public CommonPersonObject findByCaseID(String caseId) { SQLiteDatabase database = masterRepository.getReadableDatabase(); Cursor cursor = null; try { cursor = database .query(TABLE_NAME, common_TABLE_COLUMNS, ID_COLUMN + " = ?", new String[]{caseId}, null, null, null, null); List<CommonPersonObject> commons = readAllco... | CommonRepository extends DrishtiRepository { public CommonPersonObject findByCaseID(String caseId) { SQLiteDatabase database = masterRepository.getReadableDatabase(); Cursor cursor = null; try { cursor = database .query(TABLE_NAME, common_TABLE_COLUMNS, ID_COLUMN + " = ?", new String[]{caseId}, null, null, null, null);... | CommonRepository extends DrishtiRepository { public CommonPersonObject findByCaseID(String caseId) { SQLiteDatabase database = masterRepository.getReadableDatabase(); Cursor cursor = null; try { cursor = database .query(TABLE_NAME, common_TABLE_COLUMNS, ID_COLUMN + " = ?", new String[]{caseId}, null, null, null, null);... | CommonRepository extends DrishtiRepository { public CommonPersonObject findByCaseID(String caseId) { SQLiteDatabase database = masterRepository.getReadableDatabase(); Cursor cursor = null; try { cursor = database .query(TABLE_NAME, common_TABLE_COLUMNS, ID_COLUMN + " = ?", new String[]{caseId}, null, null, null, null);... | CommonRepository extends DrishtiRepository { public CommonPersonObject findByCaseID(String caseId) { SQLiteDatabase database = masterRepository.getReadableDatabase(); Cursor cursor = null; try { cursor = database .query(TABLE_NAME, common_TABLE_COLUMNS, ID_COLUMN + " = ?", new String[]{caseId}, null, null, null, null);... |
@Test public void findByBaseEntityIdCallsDatabaseQuery1times() throws Exception { String[] columns = new String[]{"id", "relationalid", "details", "is_closed"}; MatrixCursor matrixCursor = new MatrixCursor(columns); matrixCursor.addRow(new Object[]{"caseID", "relationalID", new HashMap<String, String>(), 0}); String ta... | public CommonPersonObject findByBaseEntityId(String baseEntityId) { Cursor cursor = null; try { cursor = masterRepository.getReadableDatabase().query(TABLE_NAME, common_TABLE_COLUMNS, BASE_ENTITY_ID_COLUMN + " = ? " + "COLLATE NOCASE ", new String[]{baseEntityId}, null, null, null, null); List<CommonPersonObject> commo... | CommonRepository extends DrishtiRepository { public CommonPersonObject findByBaseEntityId(String baseEntityId) { Cursor cursor = null; try { cursor = masterRepository.getReadableDatabase().query(TABLE_NAME, common_TABLE_COLUMNS, BASE_ENTITY_ID_COLUMN + " = ? " + "COLLATE NOCASE ", new String[]{baseEntityId}, null, null... | CommonRepository extends DrishtiRepository { public CommonPersonObject findByBaseEntityId(String baseEntityId) { Cursor cursor = null; try { cursor = masterRepository.getReadableDatabase().query(TABLE_NAME, common_TABLE_COLUMNS, BASE_ENTITY_ID_COLUMN + " = ? " + "COLLATE NOCASE ", new String[]{baseEntityId}, null, null... | CommonRepository extends DrishtiRepository { public CommonPersonObject findByBaseEntityId(String baseEntityId) { Cursor cursor = null; try { cursor = masterRepository.getReadableDatabase().query(TABLE_NAME, common_TABLE_COLUMNS, BASE_ENTITY_ID_COLUMN + " = ? " + "COLLATE NOCASE ", new String[]{baseEntityId}, null, null... | CommonRepository extends DrishtiRepository { public CommonPersonObject findByBaseEntityId(String baseEntityId) { Cursor cursor = null; try { cursor = masterRepository.getReadableDatabase().query(TABLE_NAME, common_TABLE_COLUMNS, BASE_ENTITY_ID_COLUMN + " = ? " + "COLLATE NOCASE ", new String[]{baseEntityId}, null, null... |
@Test public void findByGOBHHIDCallsDatabaseQuery1times() throws Exception { String[] columns = new String[]{"id", "relationalid", "details", "is_closed"}; MatrixCursor matrixCursor = new MatrixCursor(columns); matrixCursor.addRow(new Object[]{"caseID", "relationalID", new HashMap<String, String>(), 0}); String tablena... | public CommonPersonObject findHHByGOBHHID(String caseId) { SQLiteDatabase database = masterRepository.getReadableDatabase(); Cursor cursor = null; try { cursor = database .query(TABLE_NAME, common_TABLE_COLUMNS, "FWGOBHHID" + " = ?", new String[]{caseId}, null, null, null, null); List<CommonPersonObject> commons = read... | CommonRepository extends DrishtiRepository { public CommonPersonObject findHHByGOBHHID(String caseId) { SQLiteDatabase database = masterRepository.getReadableDatabase(); Cursor cursor = null; try { cursor = database .query(TABLE_NAME, common_TABLE_COLUMNS, "FWGOBHHID" + " = ?", new String[]{caseId}, null, null, null, n... | CommonRepository extends DrishtiRepository { public CommonPersonObject findHHByGOBHHID(String caseId) { SQLiteDatabase database = masterRepository.getReadableDatabase(); Cursor cursor = null; try { cursor = database .query(TABLE_NAME, common_TABLE_COLUMNS, "FWGOBHHID" + " = ?", new String[]{caseId}, null, null, null, n... | CommonRepository extends DrishtiRepository { public CommonPersonObject findHHByGOBHHID(String caseId) { SQLiteDatabase database = masterRepository.getReadableDatabase(); Cursor cursor = null; try { cursor = database .query(TABLE_NAME, common_TABLE_COLUMNS, "FWGOBHHID" + " = ?", new String[]{caseId}, null, null, null, n... | CommonRepository extends DrishtiRepository { public CommonPersonObject findHHByGOBHHID(String caseId) { SQLiteDatabase database = masterRepository.getReadableDatabase(); Cursor cursor = null; try { cursor = database .query(TABLE_NAME, common_TABLE_COLUMNS, "FWGOBHHID" + " = ?", new String[]{caseId}, null, null, null, n... |
@Test public void allcommonCallsDatabaseQuery1times() throws Exception { String[] columns = new String[]{"id", "relationalid", "details", "is_closed"}; MatrixCursor matrixCursor = new MatrixCursor(columns); matrixCursor.addRow(new Object[]{"caseID", "relationalID", new HashMap<String, String>(), 0}); String tablename =... | public List<CommonPersonObject> allcommon() { SQLiteDatabase database = masterRepository.getReadableDatabase(); Cursor cursor = null; try { cursor = database .query(TABLE_NAME, common_TABLE_COLUMNS, null, null, null, null, null, null); return readAllcommon(cursor); } finally { if (cursor != null) { cursor.close(); } } ... | CommonRepository extends DrishtiRepository { public List<CommonPersonObject> allcommon() { SQLiteDatabase database = masterRepository.getReadableDatabase(); Cursor cursor = null; try { cursor = database .query(TABLE_NAME, common_TABLE_COLUMNS, null, null, null, null, null, null); return readAllcommon(cursor); } finally... | CommonRepository extends DrishtiRepository { public List<CommonPersonObject> allcommon() { SQLiteDatabase database = masterRepository.getReadableDatabase(); Cursor cursor = null; try { cursor = database .query(TABLE_NAME, common_TABLE_COLUMNS, null, null, null, null, null, null); return readAllcommon(cursor); } finally... | CommonRepository extends DrishtiRepository { public List<CommonPersonObject> allcommon() { SQLiteDatabase database = masterRepository.getReadableDatabase(); Cursor cursor = null; try { cursor = database .query(TABLE_NAME, common_TABLE_COLUMNS, null, null, null, null, null, null); return readAllcommon(cursor); } finally... | CommonRepository extends DrishtiRepository { public List<CommonPersonObject> allcommon() { SQLiteDatabase database = masterRepository.getReadableDatabase(); Cursor cursor = null; try { cursor = database .query(TABLE_NAME, common_TABLE_COLUMNS, null, null, null, null, null, null); return readAllcommon(cursor); } finally... |
@Test public void readAllcommonforCursorAdapterReturnsNotNUll() throws Exception { String[] columns = new String[]{"_id", "relationalid", "details", "is_closed"}; MatrixCursor matrixCursor = new MatrixCursor(columns); matrixCursor.addRow(new Object[]{"caseID", "relationalID", new HashMap<String, String>(), 0}); matrixC... | public CommonPersonObject readAllcommonforCursorAdapter(Cursor cursor) { int columncount = cursor.getColumnCount(); HashMap<String, String> columns = new HashMap<String, String>(); for (int i = 0; i < columncount; i++) { String columnName = cursor.getColumnName(i); String value = cursor.getString(cursor.getColumnIndex(... | CommonRepository extends DrishtiRepository { public CommonPersonObject readAllcommonforCursorAdapter(Cursor cursor) { int columncount = cursor.getColumnCount(); HashMap<String, String> columns = new HashMap<String, String>(); for (int i = 0; i < columncount; i++) { String columnName = cursor.getColumnName(i); String va... | CommonRepository extends DrishtiRepository { public CommonPersonObject readAllcommonforCursorAdapter(Cursor cursor) { int columncount = cursor.getColumnCount(); HashMap<String, String> columns = new HashMap<String, String>(); for (int i = 0; i < columncount; i++) { String columnName = cursor.getColumnName(i); String va... | CommonRepository extends DrishtiRepository { public CommonPersonObject readAllcommonforCursorAdapter(Cursor cursor) { int columncount = cursor.getColumnCount(); HashMap<String, String> columns = new HashMap<String, String>(); for (int i = 0; i < columncount; i++) { String columnName = cursor.getColumnName(i); String va... | CommonRepository extends DrishtiRepository { public CommonPersonObject readAllcommonforCursorAdapter(Cursor cursor) { int columncount = cursor.getColumnCount(); HashMap<String, String> columns = new HashMap<String, String>(); for (int i = 0; i < columncount; i++) { String columnName = cursor.getColumnName(i); String va... |
@Test public void readAllcommonforFieldReturnsNotNUll() throws Exception { String[] columns = new String[]{"_id", "relationalid", "details", "is_closed"}; MatrixCursor matrixCursor = new MatrixCursor(columns); matrixCursor.addRow(new Object[]{0, 0, 0, 0}); matrixCursor.addRow(new Object[]{1, 1, 1, 1}); String tablename... | public List<CommonPersonObject> readAllcommonForField(Cursor cursor, String tableName) { List<CommonPersonObject> commons = new ArrayList<CommonPersonObject>(); try { cursor.moveToFirst(); while (!cursor.isAfterLast()) { int columncount = cursor.getColumnCount(); HashMap<String, String> columns = new HashMap<String, St... | CommonRepository extends DrishtiRepository { public List<CommonPersonObject> readAllcommonForField(Cursor cursor, String tableName) { List<CommonPersonObject> commons = new ArrayList<CommonPersonObject>(); try { cursor.moveToFirst(); while (!cursor.isAfterLast()) { int columncount = cursor.getColumnCount(); HashMap<Str... | CommonRepository extends DrishtiRepository { public List<CommonPersonObject> readAllcommonForField(Cursor cursor, String tableName) { List<CommonPersonObject> commons = new ArrayList<CommonPersonObject>(); try { cursor.moveToFirst(); while (!cursor.isAfterLast()) { int columncount = cursor.getColumnCount(); HashMap<Str... | CommonRepository extends DrishtiRepository { public List<CommonPersonObject> readAllcommonForField(Cursor cursor, String tableName) { List<CommonPersonObject> commons = new ArrayList<CommonPersonObject>(); try { cursor.moveToFirst(); while (!cursor.isAfterLast()) { int columncount = cursor.getColumnCount(); HashMap<Str... | CommonRepository extends DrishtiRepository { public List<CommonPersonObject> readAllcommonForField(Cursor cursor, String tableName) { List<CommonPersonObject> commons = new ArrayList<CommonPersonObject>(); try { cursor.moveToFirst(); while (!cursor.isAfterLast()) { int columncount = cursor.getColumnCount(); HashMap<Str... |
@Test public void updateDetailsCallsDatabaseUpdate1Times() throws Exception { String[] columns = new String[]{"id", "relationalid", "details", "is_closed"}; MatrixCursor matrixCursor = new MatrixCursor(columns); matrixCursor.addRow(new Object[]{"caseID", "relationalID", new HashMap<String, String>(), 0}); matrixCursor.... | public void updateDetails(String caseId, Map<String, String> details) { SQLiteDatabase database = masterRepository.getWritableDatabase(); CommonPersonObject common = findByCaseID(caseId); if (common == null) { return; } ContentValues valuesToUpdate = new ContentValues(); valuesToUpdate.put(DETAILS_COLUMN, new Gson().to... | CommonRepository extends DrishtiRepository { public void updateDetails(String caseId, Map<String, String> details) { SQLiteDatabase database = masterRepository.getWritableDatabase(); CommonPersonObject common = findByCaseID(caseId); if (common == null) { return; } ContentValues valuesToUpdate = new ContentValues(); val... | CommonRepository extends DrishtiRepository { public void updateDetails(String caseId, Map<String, String> details) { SQLiteDatabase database = masterRepository.getWritableDatabase(); CommonPersonObject common = findByCaseID(caseId); if (common == null) { return; } ContentValues valuesToUpdate = new ContentValues(); val... | CommonRepository extends DrishtiRepository { public void updateDetails(String caseId, Map<String, String> details) { SQLiteDatabase database = masterRepository.getWritableDatabase(); CommonPersonObject common = findByCaseID(caseId); if (common == null) { return; } ContentValues valuesToUpdate = new ContentValues(); val... | CommonRepository extends DrishtiRepository { public void updateDetails(String caseId, Map<String, String> details) { SQLiteDatabase database = masterRepository.getWritableDatabase(); CommonPersonObject common = findByCaseID(caseId); if (common == null) { return; } ContentValues valuesToUpdate = new ContentValues(); val... |
@Test public void mergeDetailsCallsDatabaseUpdate1Times() throws Exception { String[] columns = new String[]{"id", "relationalid", "details", "is_closed"}; MatrixCursor matrixCursor = new MatrixCursor(columns); matrixCursor.addRow(new Object[]{"caseID", "relationalID", new HashMap<String, String>(), 0}); matrixCursor.a... | public void mergeDetails(String caseId, Map<String, String> details) { SQLiteDatabase database = masterRepository.getWritableDatabase(); CommonPersonObject common = findByCaseID(caseId); if (common == null) { return; } Map<String, String> mergedDetails = new HashMap<String, String>(common.getDetails()); mergedDetails.p... | CommonRepository extends DrishtiRepository { public void mergeDetails(String caseId, Map<String, String> details) { SQLiteDatabase database = masterRepository.getWritableDatabase(); CommonPersonObject common = findByCaseID(caseId); if (common == null) { return; } Map<String, String> mergedDetails = new HashMap<String, ... | CommonRepository extends DrishtiRepository { public void mergeDetails(String caseId, Map<String, String> details) { SQLiteDatabase database = masterRepository.getWritableDatabase(); CommonPersonObject common = findByCaseID(caseId); if (common == null) { return; } Map<String, String> mergedDetails = new HashMap<String, ... | CommonRepository extends DrishtiRepository { public void mergeDetails(String caseId, Map<String, String> details) { SQLiteDatabase database = masterRepository.getWritableDatabase(); CommonPersonObject common = findByCaseID(caseId); if (common == null) { return; } Map<String, String> mergedDetails = new HashMap<String, ... | CommonRepository extends DrishtiRepository { public void mergeDetails(String caseId, Map<String, String> details) { SQLiteDatabase database = masterRepository.getWritableDatabase(); CommonPersonObject common = findByCaseID(caseId); if (common == null) { return; } Map<String, String> mergedDetails = new HashMap<String, ... |
@Test public void assertOnCreateCallsDatabaseExec() { String tablename = ""; String[] tableColumns = new String[]{CommonRepository.Relational_Underscore_ID, CommonRepository.BASE_ENTITY_ID_COLUMN, ADDITIONALCOLUMN, CUSTOMRELATIONALID}; commonFtsObject = Mockito.mock(CommonFtsObject.class); Mockito.when(commonFtsObject.... | @Override public void onCreate(SQLiteDatabase database) { database.execSQL(common_SQL); if (StringUtils.isNotBlank(common_ID_INDEX_SQL)) { database.execSQL(common_ID_INDEX_SQL); } if (StringUtils.isNotBlank(common_Relational_ID_INDEX_SQL)) { database.execSQL(common_Relational_ID_INDEX_SQL); } if (StringUtils.isNotBlank... | CommonRepository extends DrishtiRepository { @Override public void onCreate(SQLiteDatabase database) { database.execSQL(common_SQL); if (StringUtils.isNotBlank(common_ID_INDEX_SQL)) { database.execSQL(common_ID_INDEX_SQL); } if (StringUtils.isNotBlank(common_Relational_ID_INDEX_SQL)) { database.execSQL(common_Relationa... | CommonRepository extends DrishtiRepository { @Override public void onCreate(SQLiteDatabase database) { database.execSQL(common_SQL); if (StringUtils.isNotBlank(common_ID_INDEX_SQL)) { database.execSQL(common_ID_INDEX_SQL); } if (StringUtils.isNotBlank(common_Relational_ID_INDEX_SQL)) { database.execSQL(common_Relationa... | CommonRepository extends DrishtiRepository { @Override public void onCreate(SQLiteDatabase database) { database.execSQL(common_SQL); if (StringUtils.isNotBlank(common_ID_INDEX_SQL)) { database.execSQL(common_ID_INDEX_SQL); } if (StringUtils.isNotBlank(common_Relational_ID_INDEX_SQL)) { database.execSQL(common_Relationa... | CommonRepository extends DrishtiRepository { @Override public void onCreate(SQLiteDatabase database) { database.execSQL(common_SQL); if (StringUtils.isNotBlank(common_ID_INDEX_SQL)) { database.execSQL(common_ID_INDEX_SQL); } if (StringUtils.isNotBlank(common_Relational_ID_INDEX_SQL)) { database.execSQL(common_Relationa... |
@Test public void assertCloseCaseCallsDatabaseExec() { String tablename = "table"; String baseEntityId = "1"; String[] tableColumns = new String[]{CommonRepository.Relational_Underscore_ID, CommonRepository.BASE_ENTITY_ID_COLUMN, ADDITIONALCOLUMN, CUSTOMRELATIONALID}; commonFtsObject = Mockito.mock(CommonFtsObject.clas... | public void closeCase(String baseEntityId, String tableName) { try { SQLiteDatabase db = masterRepository.getWritableDatabase(); ContentValues cv = new ContentValues(); cv.put(IS_CLOSED_COLUMN, 1); db.update(tableName, cv, BASE_ENTITY_ID_COLUMN + "=?", new String[]{baseEntityId}); } catch (Exception e) { Timber.e(e); }... | CommonRepository extends DrishtiRepository { public void closeCase(String baseEntityId, String tableName) { try { SQLiteDatabase db = masterRepository.getWritableDatabase(); ContentValues cv = new ContentValues(); cv.put(IS_CLOSED_COLUMN, 1); db.update(tableName, cv, BASE_ENTITY_ID_COLUMN + "=?", new String[]{baseEntit... | CommonRepository extends DrishtiRepository { public void closeCase(String baseEntityId, String tableName) { try { SQLiteDatabase db = masterRepository.getWritableDatabase(); ContentValues cv = new ContentValues(); cv.put(IS_CLOSED_COLUMN, 1); db.update(tableName, cv, BASE_ENTITY_ID_COLUMN + "=?", new String[]{baseEntit... | CommonRepository extends DrishtiRepository { public void closeCase(String baseEntityId, String tableName) { try { SQLiteDatabase db = masterRepository.getWritableDatabase(); ContentValues cv = new ContentValues(); cv.put(IS_CLOSED_COLUMN, 1); db.update(tableName, cv, BASE_ENTITY_ID_COLUMN + "=?", new String[]{baseEntit... | CommonRepository extends DrishtiRepository { public void closeCase(String baseEntityId, String tableName) { try { SQLiteDatabase db = masterRepository.getWritableDatabase(); ContentValues cv = new ContentValues(); cv.put(IS_CLOSED_COLUMN, 1); db.update(tableName, cv, BASE_ENTITY_ID_COLUMN + "=?", new String[]{baseEntit... |
@Test public void testSaveCredentialsUpdatesSharedPreferencesWithNewDBEncryptionVersion() { Mockito.doReturn(SyncFilter.LOCATION_ID).when(syncConfiguration).getEncryptionParam(); credentialsHelper.saveCredentials(CredentialsHelper.CREDENTIALS_TYPE.DB_AUTH, TEST_ENCRYPTED_PWD); ArgumentCaptor<Integer> encryptionValueArg... | public void saveCredentials(String type, String encryptedPassphrase) { if (CREDENTIALS_TYPE.DB_AUTH.equals(type)) { allSharedPreferences.savePassphrase(encryptedPassphrase, CoreLibrary.getInstance().getSyncConfiguration().getEncryptionParam().name()); allSharedPreferences.setDBEncryptionVersion(BuildConfig.DB_ENCRYPTIO... | CredentialsHelper { public void saveCredentials(String type, String encryptedPassphrase) { if (CREDENTIALS_TYPE.DB_AUTH.equals(type)) { allSharedPreferences.savePassphrase(encryptedPassphrase, CoreLibrary.getInstance().getSyncConfiguration().getEncryptionParam().name()); allSharedPreferences.setDBEncryptionVersion(Buil... | CredentialsHelper { public void saveCredentials(String type, String encryptedPassphrase) { if (CREDENTIALS_TYPE.DB_AUTH.equals(type)) { allSharedPreferences.savePassphrase(encryptedPassphrase, CoreLibrary.getInstance().getSyncConfiguration().getEncryptionParam().name()); allSharedPreferences.setDBEncryptionVersion(Buil... | CredentialsHelper { public void saveCredentials(String type, String encryptedPassphrase) { if (CREDENTIALS_TYPE.DB_AUTH.equals(type)) { allSharedPreferences.savePassphrase(encryptedPassphrase, CoreLibrary.getInstance().getSyncConfiguration().getEncryptionParam().name()); allSharedPreferences.setDBEncryptionVersion(Buil... | CredentialsHelper { public void saveCredentials(String type, String encryptedPassphrase) { if (CREDENTIALS_TYPE.DB_AUTH.equals(type)) { allSharedPreferences.savePassphrase(encryptedPassphrase, CoreLibrary.getInstance().getSyncConfiguration().getEncryptionParam().name()); allSharedPreferences.setDBEncryptionVersion(Buil... |
@Test public void assertDeleteCaseCallsDatabaseExec() { String tablename = "table"; String baseEntityId = "1"; String[] tableColumns = new String[]{CommonRepository.Relational_Underscore_ID, CommonRepository.BASE_ENTITY_ID_COLUMN, ADDITIONALCOLUMN, CUSTOMRELATIONALID}; commonFtsObject = Mockito.mock(CommonFtsObject.cla... | public boolean deleteCase(String baseEntityId, String tableName) { try { SQLiteDatabase db = masterRepository.getWritableDatabase(); int afftectedRows = db .delete(tableName, BASE_ENTITY_ID_COLUMN + " = ? COLLATE NOCASE" + " ", new String[]{baseEntityId}); if (afftectedRows > 0) { return true; } } catch (Exception e) {... | CommonRepository extends DrishtiRepository { public boolean deleteCase(String baseEntityId, String tableName) { try { SQLiteDatabase db = masterRepository.getWritableDatabase(); int afftectedRows = db .delete(tableName, BASE_ENTITY_ID_COLUMN + " = ? COLLATE NOCASE" + " ", new String[]{baseEntityId}); if (afftectedRows ... | CommonRepository extends DrishtiRepository { public boolean deleteCase(String baseEntityId, String tableName) { try { SQLiteDatabase db = masterRepository.getWritableDatabase(); int afftectedRows = db .delete(tableName, BASE_ENTITY_ID_COLUMN + " = ? COLLATE NOCASE" + " ", new String[]{baseEntityId}); if (afftectedRows ... | CommonRepository extends DrishtiRepository { public boolean deleteCase(String baseEntityId, String tableName) { try { SQLiteDatabase db = masterRepository.getWritableDatabase(); int afftectedRows = db .delete(tableName, BASE_ENTITY_ID_COLUMN + " = ? COLLATE NOCASE" + " ", new String[]{baseEntityId}); if (afftectedRows ... | CommonRepository extends DrishtiRepository { public boolean deleteCase(String baseEntityId, String tableName) { try { SQLiteDatabase db = masterRepository.getWritableDatabase(); int afftectedRows = db .delete(tableName, BASE_ENTITY_ID_COLUMN + " = ? COLLATE NOCASE" + " ", new String[]{baseEntityId}); if (afftectedRows ... |
@Test public void assertRawQueryReturnsMap() { String[] columns = new String[]{"id", "relationalid", "details", "is_closed"}; MatrixCursor cursor = new MatrixCursor(columns); cursor.addRow(new Object[]{"caseID", "relationalID", "dd1", "0"}); cursor.addRow(new Object[]{"caseID2", "relationalID2", "dd2", "0"}); String ta... | public ArrayList<HashMap<String, String>> rawQuery(String sql, String[] selectionArgs) { ArrayList<HashMap<String, String>> maplist = new ArrayList<HashMap<String, String>>(); Cursor cursor = null; try { SQLiteDatabase database = masterRepository.getReadableDatabase(); cursor = database.rawQuery(sql, selectionArgs); if... | CommonRepository extends DrishtiRepository { public ArrayList<HashMap<String, String>> rawQuery(String sql, String[] selectionArgs) { ArrayList<HashMap<String, String>> maplist = new ArrayList<HashMap<String, String>>(); Cursor cursor = null; try { SQLiteDatabase database = masterRepository.getReadableDatabase(); curso... | CommonRepository extends DrishtiRepository { public ArrayList<HashMap<String, String>> rawQuery(String sql, String[] selectionArgs) { ArrayList<HashMap<String, String>> maplist = new ArrayList<HashMap<String, String>>(); Cursor cursor = null; try { SQLiteDatabase database = masterRepository.getReadableDatabase(); curso... | CommonRepository extends DrishtiRepository { public ArrayList<HashMap<String, String>> rawQuery(String sql, String[] selectionArgs) { ArrayList<HashMap<String, String>> maplist = new ArrayList<HashMap<String, String>>(); Cursor cursor = null; try { SQLiteDatabase database = masterRepository.getReadableDatabase(); curso... | CommonRepository extends DrishtiRepository { public ArrayList<HashMap<String, String>> rawQuery(String sql, String[] selectionArgs) { ArrayList<HashMap<String, String>> maplist = new ArrayList<HashMap<String, String>>(); Cursor cursor = null; try { SQLiteDatabase database = masterRepository.getReadableDatabase(); curso... |
@Test public void deleteSearchRecordShouldReturnTrueAndCommitTransaction() { String tablename = "ec_client"; String[] tableColumns = new String[]{}; commonRepository = new CommonRepository(tablename, tableColumns); repository = Mockito.mock(Repository.class); sqliteDatabase = Mockito.mock(SQLiteDatabase.class); Mockito... | public boolean deleteSearchRecord(String caseId) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.beginTransaction(); String ftsSearchTable = CommonFtsObject.searchTableName(TABLE_NAME); try { int afftectedRows = database .delete(ftsSearchTable, CommonFtsObject.idColumn + " = " + "?", new St... | CommonRepository extends DrishtiRepository { public boolean deleteSearchRecord(String caseId) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.beginTransaction(); String ftsSearchTable = CommonFtsObject.searchTableName(TABLE_NAME); try { int afftectedRows = database .delete(ftsSearchTable, C... | CommonRepository extends DrishtiRepository { public boolean deleteSearchRecord(String caseId) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.beginTransaction(); String ftsSearchTable = CommonFtsObject.searchTableName(TABLE_NAME); try { int afftectedRows = database .delete(ftsSearchTable, C... | CommonRepository extends DrishtiRepository { public boolean deleteSearchRecord(String caseId) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.beginTransaction(); String ftsSearchTable = CommonFtsObject.searchTableName(TABLE_NAME); try { int afftectedRows = database .delete(ftsSearchTable, C... | CommonRepository extends DrishtiRepository { public boolean deleteSearchRecord(String caseId) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.beginTransaction(); String ftsSearchTable = CommonFtsObject.searchTableName(TABLE_NAME); try { int afftectedRows = database .delete(ftsSearchTable, C... |
@Test public void deleteSearchRecordShouldReturnFalseAndEndTransactionWhenExceptionOccurs() { ArgumentCaptor<String[]> caseIdCaptor = ArgumentCaptor.forClass(String[].class); Mockito.doAnswer(new Answer() { @Override public Object answer(InvocationOnMock invocation) throws Throwable { throw new Exception("An error occu... | public boolean deleteSearchRecord(String caseId) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.beginTransaction(); String ftsSearchTable = CommonFtsObject.searchTableName(TABLE_NAME); try { int afftectedRows = database .delete(ftsSearchTable, CommonFtsObject.idColumn + " = " + "?", new St... | CommonRepository extends DrishtiRepository { public boolean deleteSearchRecord(String caseId) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.beginTransaction(); String ftsSearchTable = CommonFtsObject.searchTableName(TABLE_NAME); try { int afftectedRows = database .delete(ftsSearchTable, C... | CommonRepository extends DrishtiRepository { public boolean deleteSearchRecord(String caseId) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.beginTransaction(); String ftsSearchTable = CommonFtsObject.searchTableName(TABLE_NAME); try { int afftectedRows = database .delete(ftsSearchTable, C... | CommonRepository extends DrishtiRepository { public boolean deleteSearchRecord(String caseId) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.beginTransaction(); String ftsSearchTable = CommonFtsObject.searchTableName(TABLE_NAME); try { int afftectedRows = database .delete(ftsSearchTable, C... | CommonRepository extends DrishtiRepository { public boolean deleteSearchRecord(String caseId) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.beginTransaction(); String ftsSearchTable = CommonFtsObject.searchTableName(TABLE_NAME); try { int afftectedRows = database .delete(ftsSearchTable, C... |
@Test public void searchBatchInsertsShouldReturnFalse() { HashMap<String, ContentValues> searchMap = new HashMap<>(); ContentValues contentValues = new ContentValues(); searchMap.put("sample-case-id", contentValues); Mockito.doThrow(new SQLException("Some exception")).when(sqliteDatabase).insert(Mockito.eq(tablename + ... | public boolean searchBatchInserts(Map<String, ContentValues> searchMap) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.beginTransaction(); String ftsSearchTable = CommonFtsObject.searchTableName(TABLE_NAME); try { for (String caseId : searchMap.keySet()) { ContentValues searchValues = sear... | CommonRepository extends DrishtiRepository { public boolean searchBatchInserts(Map<String, ContentValues> searchMap) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.beginTransaction(); String ftsSearchTable = CommonFtsObject.searchTableName(TABLE_NAME); try { for (String caseId : searchMap.... | CommonRepository extends DrishtiRepository { public boolean searchBatchInserts(Map<String, ContentValues> searchMap) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.beginTransaction(); String ftsSearchTable = CommonFtsObject.searchTableName(TABLE_NAME); try { for (String caseId : searchMap.... | CommonRepository extends DrishtiRepository { public boolean searchBatchInserts(Map<String, ContentValues> searchMap) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.beginTransaction(); String ftsSearchTable = CommonFtsObject.searchTableName(TABLE_NAME); try { for (String caseId : searchMap.... | CommonRepository extends DrishtiRepository { public boolean searchBatchInserts(Map<String, ContentValues> searchMap) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.beginTransaction(); String ftsSearchTable = CommonFtsObject.searchTableName(TABLE_NAME); try { for (String caseId : searchMap.... |
@Test public void searchBatchInsertsShouldReturnTrueAndCallSqliteDbInsert() { HashMap<String, ContentValues> searchMap = new HashMap<>(); ContentValues contentValues = new ContentValues(); searchMap.put("sample-case-id", contentValues); Assert.assertTrue(commonRepository.searchBatchInserts(searchMap)); Mockito.verify(s... | public boolean searchBatchInserts(Map<String, ContentValues> searchMap) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.beginTransaction(); String ftsSearchTable = CommonFtsObject.searchTableName(TABLE_NAME); try { for (String caseId : searchMap.keySet()) { ContentValues searchValues = sear... | CommonRepository extends DrishtiRepository { public boolean searchBatchInserts(Map<String, ContentValues> searchMap) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.beginTransaction(); String ftsSearchTable = CommonFtsObject.searchTableName(TABLE_NAME); try { for (String caseId : searchMap.... | CommonRepository extends DrishtiRepository { public boolean searchBatchInserts(Map<String, ContentValues> searchMap) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.beginTransaction(); String ftsSearchTable = CommonFtsObject.searchTableName(TABLE_NAME); try { for (String caseId : searchMap.... | CommonRepository extends DrishtiRepository { public boolean searchBatchInserts(Map<String, ContentValues> searchMap) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.beginTransaction(); String ftsSearchTable = CommonFtsObject.searchTableName(TABLE_NAME); try { for (String caseId : searchMap.... | CommonRepository extends DrishtiRepository { public boolean searchBatchInserts(Map<String, ContentValues> searchMap) { SQLiteDatabase database = masterRepository.getWritableDatabase(); database.beginTransaction(); String ftsSearchTable = CommonFtsObject.searchTableName(TABLE_NAME); try { for (String caseId : searchMap.... |
@Test public void testSearchTableNameShouldReturnCorrectSearchTableName() { assertEquals("table1_search", commonFtsObject.searchTableName("table1")); } | public static String searchTableName(String table) { return table + "_search"; } | CommonFtsObject { public static String searchTableName(String table) { return table + "_search"; } } | CommonFtsObject { public static String searchTableName(String table) { return table + "_search"; } CommonFtsObject(String[] tables); } | CommonFtsObject { public static String searchTableName(String table) { return table + "_search"; } CommonFtsObject(String[] tables); static String searchTableName(String table); void updateSearchFields(String table, String[] searchFields); void updateSortFields(String table, String[] sortFields); void updateMainConditi... | CommonFtsObject { public static String searchTableName(String table) { return table + "_search"; } CommonFtsObject(String[] tables); static String searchTableName(String table); void updateSearchFields(String table, String[] searchFields); void updateSortFields(String table, String[] sortFields); void updateMainConditi... |
@Test public void testContainsTableShouldReturnCorrectStatus() { assertTrue(commonFtsObject.containsTable("table1")); assertFalse(commonFtsObject.containsTable("table100")); } | public boolean containsTable(String table) { if (tables == null || StringUtils.isBlank(table)) { return false; } List<String> tableList = Arrays.asList(tables); return tableList.contains(table); } | CommonFtsObject { public boolean containsTable(String table) { if (tables == null || StringUtils.isBlank(table)) { return false; } List<String> tableList = Arrays.asList(tables); return tableList.contains(table); } } | CommonFtsObject { public boolean containsTable(String table) { if (tables == null || StringUtils.isBlank(table)) { return false; } List<String> tableList = Arrays.asList(tables); return tableList.contains(table); } CommonFtsObject(String[] tables); } | CommonFtsObject { public boolean containsTable(String table) { if (tables == null || StringUtils.isBlank(table)) { return false; } List<String> tableList = Arrays.asList(tables); return tableList.contains(table); } CommonFtsObject(String[] tables); static String searchTableName(String table); void updateSearchFields(St... | CommonFtsObject { public boolean containsTable(String table) { if (tables == null || StringUtils.isBlank(table)) { return false; } List<String> tableList = Arrays.asList(tables); return tableList.contains(table); } CommonFtsObject(String[] tables); static String searchTableName(String table); void updateSearchFields(St... |
@Test public void testGetTablesShouldGetAllTables() { assertEquals(tables, commonFtsObject.getTables()); } | public String[] getTables() { if (tables == null) { tables = ArrayUtils.EMPTY_STRING_ARRAY; } return tables; } | CommonFtsObject { public String[] getTables() { if (tables == null) { tables = ArrayUtils.EMPTY_STRING_ARRAY; } return tables; } } | CommonFtsObject { public String[] getTables() { if (tables == null) { tables = ArrayUtils.EMPTY_STRING_ARRAY; } return tables; } CommonFtsObject(String[] tables); } | CommonFtsObject { public String[] getTables() { if (tables == null) { tables = ArrayUtils.EMPTY_STRING_ARRAY; } return tables; } CommonFtsObject(String[] tables); static String searchTableName(String table); void updateSearchFields(String table, String[] searchFields); void updateSortFields(String table, String[] sortF... | CommonFtsObject { public String[] getTables() { if (tables == null) { tables = ArrayUtils.EMPTY_STRING_ARRAY; } return tables; } CommonFtsObject(String[] tables); static String searchTableName(String table); void updateSearchFields(String table, String[] searchFields); void updateSortFields(String table, String[] sortF... |
@Test public void testFilterByColumn() { Map<String, String> column1 = EasyMap.create("name", "Woman A").map(); CommonPersonObjectClient expectedClient = new CommonPersonObjectClient("entity id 1", emptyMap, "Woman A"); expectedClient.setColumnmaps(column1); boolean filter = commonObjectFilterOption.filter(expectedClie... | @Override public boolean filter(SmartRegisterClient client) { switch (byColumnAndByDetails) { case byColumn: return ((CommonPersonObjectClient) client).getColumnmaps().get(fieldname). contains(criteria); case byDetails: return (((CommonPersonObjectClient) client).getDetails().get(fieldname) != null ? ((CommonPersonObje... | CommonObjectFilterOption implements FilterOption { @Override public boolean filter(SmartRegisterClient client) { switch (byColumnAndByDetails) { case byColumn: return ((CommonPersonObjectClient) client).getColumnmaps().get(fieldname). contains(criteria); case byDetails: return (((CommonPersonObjectClient) client).getDe... | CommonObjectFilterOption implements FilterOption { @Override public boolean filter(SmartRegisterClient client) { switch (byColumnAndByDetails) { case byColumn: return ((CommonPersonObjectClient) client).getColumnmaps().get(fieldname). contains(criteria); case byDetails: return (((CommonPersonObjectClient) client).getDe... | CommonObjectFilterOption implements FilterOption { @Override public boolean filter(SmartRegisterClient client) { switch (byColumnAndByDetails) { case byColumn: return ((CommonPersonObjectClient) client).getColumnmaps().get(fieldname). contains(criteria); case byDetails: return (((CommonPersonObjectClient) client).getDe... | CommonObjectFilterOption implements FilterOption { @Override public boolean filter(SmartRegisterClient client) { switch (byColumnAndByDetails) { case byColumn: return ((CommonPersonObjectClient) client).getColumnmaps().get(fieldname). contains(criteria); case byDetails: return (((CommonPersonObjectClient) client).getDe... |
@Test public void generateLocalAuthCredentials() throws Exception { Assert.assertNotNull(credentialsHelper); PowerMockito.mockStatic(SecurityHelper.class); PowerMockito.when(SecurityHelper.getPasswordHash(TEST_DUMMY_PASSWORD)).thenReturn(null); credentialsHelper.generateLocalAuthCredentials(TEST_DUMMY_PASSWORD); PowerM... | public PasswordHash generateLocalAuthCredentials(char[] password) throws InvalidKeySpecException, NoSuchAlgorithmException { if (password == null) return null; return SecurityHelper.getPasswordHash(password); } | CredentialsHelper { public PasswordHash generateLocalAuthCredentials(char[] password) throws InvalidKeySpecException, NoSuchAlgorithmException { if (password == null) return null; return SecurityHelper.getPasswordHash(password); } } | CredentialsHelper { public PasswordHash generateLocalAuthCredentials(char[] password) throws InvalidKeySpecException, NoSuchAlgorithmException { if (password == null) return null; return SecurityHelper.getPasswordHash(password); } CredentialsHelper(Context context); } | CredentialsHelper { public PasswordHash generateLocalAuthCredentials(char[] password) throws InvalidKeySpecException, NoSuchAlgorithmException { if (password == null) return null; return SecurityHelper.getPasswordHash(password); } CredentialsHelper(Context context); static boolean shouldMigrate(); byte[] getCredentials... | CredentialsHelper { public PasswordHash generateLocalAuthCredentials(char[] password) throws InvalidKeySpecException, NoSuchAlgorithmException { if (password == null) return null; return SecurityHelper.getPasswordHash(password); } CredentialsHelper(Context context); static boolean shouldMigrate(); byte[] getCredentials... |
@Test public void testFilterOptionName() { assertEquals(filterOptionName, commonObjectFilterOption.name()); } | @Override public String name() { return filterOptionName; } | CommonObjectFilterOption implements FilterOption { @Override public String name() { return filterOptionName; } } | CommonObjectFilterOption implements FilterOption { @Override public String name() { return filterOptionName; } CommonObjectFilterOption(String criteriaArg, String fieldnameArg, ByColumnAndByDetails
byColumnAndByDetailsArg, String filteroptionnameArg); } | CommonObjectFilterOption implements FilterOption { @Override public String name() { return filterOptionName; } CommonObjectFilterOption(String criteriaArg, String fieldnameArg, ByColumnAndByDetails
byColumnAndByDetailsArg, String filteroptionnameArg); @Override String name(); @Override boolean filter(SmartR... | CommonObjectFilterOption implements FilterOption { @Override public String name() { return filterOptionName; } CommonObjectFilterOption(String criteriaArg, String fieldnameArg, ByColumnAndByDetails
byColumnAndByDetailsArg, String filteroptionnameArg); @Override String name(); @Override boolean filter(SmartR... |
@Test public void testFilterByDetails() { commonObjectFilterOption = new CommonObjectFilterOption(criteria, fieldname, byDetails, filterOptionName); Map<String, String> detail = EasyMap.create("name", "Woman A").map(); CommonPersonObjectClient expectedClient = new CommonPersonObjectClient("entity id 1", detail, "Woman ... | @Override public boolean filter(SmartRegisterClient client) { switch (byColumnAndByDetails) { case byColumn: return ((CommonPersonObjectClient) client).getColumnmaps().get(fieldname). contains(criteria); case byDetails: return (((CommonPersonObjectClient) client).getDetails().get(fieldname) != null ? ((CommonPersonObje... | CommonObjectFilterOption implements FilterOption { @Override public boolean filter(SmartRegisterClient client) { switch (byColumnAndByDetails) { case byColumn: return ((CommonPersonObjectClient) client).getColumnmaps().get(fieldname). contains(criteria); case byDetails: return (((CommonPersonObjectClient) client).getDe... | CommonObjectFilterOption implements FilterOption { @Override public boolean filter(SmartRegisterClient client) { switch (byColumnAndByDetails) { case byColumn: return ((CommonPersonObjectClient) client).getColumnmaps().get(fieldname). contains(criteria); case byDetails: return (((CommonPersonObjectClient) client).getDe... | CommonObjectFilterOption implements FilterOption { @Override public boolean filter(SmartRegisterClient client) { switch (byColumnAndByDetails) { case byColumn: return ((CommonPersonObjectClient) client).getColumnmaps().get(fieldname). contains(criteria); case byDetails: return (((CommonPersonObjectClient) client).getDe... | CommonObjectFilterOption implements FilterOption { @Override public boolean filter(SmartRegisterClient client) { switch (byColumnAndByDetails) { case byColumn: return ((CommonPersonObjectClient) client).getColumnmaps().get(fieldname). contains(criteria); case byDetails: return (((CommonPersonObjectClient) client).getDe... |
@Test public void shouldSortECsByName() throws Exception { Map<String, String> personDetails1 = EasyMap.create("name", "Woman A").map(); Map<String, String> personDetails2 = EasyMap.create("name", "Woman B").map(); Map<String, String> personDetails3 = EasyMap.create("name", "Woman C").map(); CommonPersonObject cpo2 = n... | public String get() { return cache.get(person_CLIENTS_LIST, new CacheableData<String>() { @Override public String fetch() { List<CommonPersonObject> p = allpersonobjects.all(); updateDetails(p); CommonPersonObjectClients pClients = new CommonPersonObjectClients(); if (filtermap != null) { for (CommonPersonObject person... | CommonPersonObjectController { public String get() { return cache.get(person_CLIENTS_LIST, new CacheableData<String>() { @Override public String fetch() { List<CommonPersonObject> p = allpersonobjects.all(); updateDetails(p); CommonPersonObjectClients pClients = new CommonPersonObjectClients(); if (filtermap != null) {... | CommonPersonObjectController { public String get() { return cache.get(person_CLIENTS_LIST, new CacheableData<String>() { @Override public String fetch() { List<CommonPersonObject> p = allpersonobjects.all(); updateDetails(p); CommonPersonObjectClients pClients = new CommonPersonObjectClients(); if (filtermap != null) {... | CommonPersonObjectController { public String get() { return cache.get(person_CLIENTS_LIST, new CacheableData<String>() { @Override public String fetch() { List<CommonPersonObject> p = allpersonobjects.all(); updateDetails(p); CommonPersonObjectClients pClients = new CommonPersonObjectClients(); if (filtermap != null) {... | CommonPersonObjectController { public String get() { return cache.get(person_CLIENTS_LIST, new CacheableData<String>() { @Override public String fetch() { List<CommonPersonObject> p = allpersonobjects.all(); updateDetails(p); CommonPersonObjectClients pClients = new CommonPersonObjectClients(); if (filtermap != null) {... |
@Test public void shouldMapCommonObjectToCommonObjectClient() throws Exception { Map<String, String> details = EasyMap.create("name", "Woman A").map(); CommonPersonObject commonpersonobject = new CommonPersonObject("entity id 1", "relational id 1", details, "bindtype"); commonpersonobject.setColumnmaps(emptyDetails); M... | public String get() { return cache.get(person_CLIENTS_LIST, new CacheableData<String>() { @Override public String fetch() { List<CommonPersonObject> p = allpersonobjects.all(); updateDetails(p); CommonPersonObjectClients pClients = new CommonPersonObjectClients(); if (filtermap != null) { for (CommonPersonObject person... | CommonPersonObjectController { public String get() { return cache.get(person_CLIENTS_LIST, new CacheableData<String>() { @Override public String fetch() { List<CommonPersonObject> p = allpersonobjects.all(); updateDetails(p); CommonPersonObjectClients pClients = new CommonPersonObjectClients(); if (filtermap != null) {... | CommonPersonObjectController { public String get() { return cache.get(person_CLIENTS_LIST, new CacheableData<String>() { @Override public String fetch() { List<CommonPersonObject> p = allpersonobjects.all(); updateDetails(p); CommonPersonObjectClients pClients = new CommonPersonObjectClients(); if (filtermap != null) {... | CommonPersonObjectController { public String get() { return cache.get(person_CLIENTS_LIST, new CacheableData<String>() { @Override public String fetch() { List<CommonPersonObject> p = allpersonobjects.all(); updateDetails(p); CommonPersonObjectClients pClients = new CommonPersonObjectClients(); if (filtermap != null) {... | CommonPersonObjectController { public String get() { return cache.get(person_CLIENTS_LIST, new CacheableData<String>() { @Override public String fetch() { List<CommonPersonObject> p = allpersonobjects.all(); updateDetails(p); CommonPersonObjectClients pClients = new CommonPersonObjectClients(); if (filtermap != null) {... |
@Test public void shouldfilterNullsAccordingToFilterKey() throws Exception { Map<String, String> personDetails1 = EasyMap.create("name", "Woman A").map(); Map<String, String> personDetails2 = EasyMap.create("name", "Woman B").map(); Map<String, String> personDetails3 = emptyDetails; CommonPersonObject cpo2 = new Common... | public String get() { return cache.get(person_CLIENTS_LIST, new CacheableData<String>() { @Override public String fetch() { List<CommonPersonObject> p = allpersonobjects.all(); updateDetails(p); CommonPersonObjectClients pClients = new CommonPersonObjectClients(); if (filtermap != null) { for (CommonPersonObject person... | CommonPersonObjectController { public String get() { return cache.get(person_CLIENTS_LIST, new CacheableData<String>() { @Override public String fetch() { List<CommonPersonObject> p = allpersonobjects.all(); updateDetails(p); CommonPersonObjectClients pClients = new CommonPersonObjectClients(); if (filtermap != null) {... | CommonPersonObjectController { public String get() { return cache.get(person_CLIENTS_LIST, new CacheableData<String>() { @Override public String fetch() { List<CommonPersonObject> p = allpersonobjects.all(); updateDetails(p); CommonPersonObjectClients pClients = new CommonPersonObjectClients(); if (filtermap != null) {... | CommonPersonObjectController { public String get() { return cache.get(person_CLIENTS_LIST, new CacheableData<String>() { @Override public String fetch() { List<CommonPersonObject> p = allpersonobjects.all(); updateDetails(p); CommonPersonObjectClients pClients = new CommonPersonObjectClients(); if (filtermap != null) {... | CommonPersonObjectController { public String get() { return cache.get(person_CLIENTS_LIST, new CacheableData<String>() { @Override public String fetch() { List<CommonPersonObject> p = allpersonobjects.all(); updateDetails(p); CommonPersonObjectClients pClients = new CommonPersonObjectClients(); if (filtermap != null) {... |
@Test public void testGetOauthAccountByType() { Account account = AccountHelper.getOauthAccountByNameAndType(CORE_ACCOUNT_NAME, CORE_ACCOUNT_TYPE); Assert.assertNotNull(account); Assert.assertEquals(CORE_ACCOUNT_NAME, account.name); } | public static Account getOauthAccountByNameAndType(String accountName, String accountType) { Account[] accounts = accountManager.getAccountsByType(accountType); return accounts.length > 0 ? selectAccount(accounts, accountName) : null; } | AccountHelper { public static Account getOauthAccountByNameAndType(String accountName, String accountType) { Account[] accounts = accountManager.getAccountsByType(accountType); return accounts.length > 0 ? selectAccount(accounts, accountName) : null; } } | AccountHelper { public static Account getOauthAccountByNameAndType(String accountName, String accountType) { Account[] accounts = accountManager.getAccountsByType(accountType); return accounts.length > 0 ? selectAccount(accounts, accountName) : null; } } | AccountHelper { public static Account getOauthAccountByNameAndType(String accountName, String accountType) { Account[] accounts = accountManager.getAccountsByType(accountType); return accounts.length > 0 ? selectAccount(accounts, accountName) : null; } static Account getOauthAccountByNameAndType(String accountName, St... | AccountHelper { public static Account getOauthAccountByNameAndType(String accountName, String accountType) { Account[] accounts = accountManager.getAccountsByType(accountType); return accounts.length > 0 ? selectAccount(accounts, accountName) : null; } static Account getOauthAccountByNameAndType(String accountName, St... |
@Test public void testGetAccountManagerValue() { Whitebox.setInternalState(AccountHelper.class, "accountManager", accountManager); Mockito.doReturn(TEST_VALUE).when(accountManager).getUserData(ArgumentMatchers.any(Account.class), ArgumentMatchers.eq(TEST_KEY)); String value = AccountHelper.getAccountManagerValue(TEST_K... | public static String getAccountManagerValue(String key, String accountName, String accountType) { Account account = AccountHelper.getOauthAccountByNameAndType(accountName, accountType); if (account != null) { return accountManager.getUserData(account, key); } return null; } | AccountHelper { public static String getAccountManagerValue(String key, String accountName, String accountType) { Account account = AccountHelper.getOauthAccountByNameAndType(accountName, accountType); if (account != null) { return accountManager.getUserData(account, key); } return null; } } | AccountHelper { public static String getAccountManagerValue(String key, String accountName, String accountType) { Account account = AccountHelper.getOauthAccountByNameAndType(accountName, accountType); if (account != null) { return accountManager.getUserData(account, key); } return null; } } | AccountHelper { public static String getAccountManagerValue(String key, String accountName, String accountType) { Account account = AccountHelper.getOauthAccountByNameAndType(accountName, accountType); if (account != null) { return accountManager.getUserData(account, key); } return null; } static Account getOauthAccou... | AccountHelper { public static String getAccountManagerValue(String key, String accountName, String accountType) { Account account = AccountHelper.getOauthAccountByNameAndType(accountName, accountType); if (account != null) { return accountManager.getUserData(account, key); } return null; } static Account getOauthAccou... |
@Test public void testGetOAuthToken() throws AuthenticatorException, OperationCanceledException, IOException { Mockito.doReturn(TEST_TOKEN_VALUE).when(accountManager).blockingGetAuthToken(new Account(CORE_ACCOUNT_NAME, CORE_ACCOUNT_TYPE), AUTH_TOKEN_TYPE, true); String myToken = AccountHelper.getOAuthToken(CORE_ACCOUNT... | public static String getOAuthToken(String accountName, String accountType, String authTokenType) { Account account = getOauthAccountByNameAndType(accountName, accountType); try { return accountManager.blockingGetAuthToken(account, authTokenType, true); } catch (Exception ex) { Timber.e(ex, "EXCEPTION: %s", ex.toString(... | AccountHelper { public static String getOAuthToken(String accountName, String accountType, String authTokenType) { Account account = getOauthAccountByNameAndType(accountName, accountType); try { return accountManager.blockingGetAuthToken(account, authTokenType, true); } catch (Exception ex) { Timber.e(ex, "EXCEPTION: %... | AccountHelper { public static String getOAuthToken(String accountName, String accountType, String authTokenType) { Account account = getOauthAccountByNameAndType(accountName, accountType); try { return accountManager.blockingGetAuthToken(account, authTokenType, true); } catch (Exception ex) { Timber.e(ex, "EXCEPTION: %... | AccountHelper { public static String getOAuthToken(String accountName, String accountType, String authTokenType) { Account account = getOauthAccountByNameAndType(accountName, accountType); try { return accountManager.blockingGetAuthToken(account, authTokenType, true); } catch (Exception ex) { Timber.e(ex, "EXCEPTION: %... | AccountHelper { public static String getOAuthToken(String accountName, String accountType, String authTokenType) { Account account = getOauthAccountByNameAndType(accountName, accountType); try { return accountManager.blockingGetAuthToken(account, authTokenType, true); } catch (Exception ex) { Timber.e(ex, "EXCEPTION: %... |
@Test public void testInvalidateAuthToken() { AccountHelper.invalidateAuthToken(CORE_ACCOUNT_TYPE, TEST_TOKEN_VALUE); Mockito.verify(accountManager).invalidateAuthToken(CORE_ACCOUNT_TYPE, TEST_TOKEN_VALUE); } | public static void invalidateAuthToken(String accountType, String authToken) { if (authToken != null) accountManager.invalidateAuthToken(accountType, authToken); } | AccountHelper { public static void invalidateAuthToken(String accountType, String authToken) { if (authToken != null) accountManager.invalidateAuthToken(accountType, authToken); } } | AccountHelper { public static void invalidateAuthToken(String accountType, String authToken) { if (authToken != null) accountManager.invalidateAuthToken(accountType, authToken); } } | AccountHelper { public static void invalidateAuthToken(String accountType, String authToken) { if (authToken != null) accountManager.invalidateAuthToken(accountType, authToken); } static Account getOauthAccountByNameAndType(String accountName, String accountType); static Account selectAccount(Account[] accounts, Strin... | AccountHelper { public static void invalidateAuthToken(String accountType, String authToken) { if (authToken != null) accountManager.invalidateAuthToken(accountType, authToken); } static Account getOauthAccountByNameAndType(String accountName, String accountType); static Account selectAccount(Account[] accounts, Strin... |
@Test public void testGetCachedOAuthToken() { Account account = new Account(CORE_ACCOUNT_NAME, CORE_ACCOUNT_TYPE); Mockito.doReturn(TEST_TOKEN_VALUE).when(accountManager).peekAuthToken(account, AUTH_TOKEN_TYPE); String cachedAuthToken = AccountHelper.getCachedOAuthToken(CORE_ACCOUNT_NAME, CORE_ACCOUNT_TYPE, AUTH_TOKEN_... | public static String getCachedOAuthToken(String accountName, String accountType, String authTokenType) { Account account = getOauthAccountByNameAndType(accountName, accountType); return account != null ? accountManager.peekAuthToken(account, authTokenType) : null; } | AccountHelper { public static String getCachedOAuthToken(String accountName, String accountType, String authTokenType) { Account account = getOauthAccountByNameAndType(accountName, accountType); return account != null ? accountManager.peekAuthToken(account, authTokenType) : null; } } | AccountHelper { public static String getCachedOAuthToken(String accountName, String accountType, String authTokenType) { Account account = getOauthAccountByNameAndType(accountName, accountType); return account != null ? accountManager.peekAuthToken(account, authTokenType) : null; } } | AccountHelper { public static String getCachedOAuthToken(String accountName, String accountType, String authTokenType) { Account account = getOauthAccountByNameAndType(accountName, accountType); return account != null ? accountManager.peekAuthToken(account, authTokenType) : null; } static Account getOauthAccountByName... | AccountHelper { public static String getCachedOAuthToken(String accountName, String accountType, String authTokenType) { Account account = getOauthAccountByNameAndType(accountName, accountType); return account != null ? accountManager.peekAuthToken(account, authTokenType) : null; } static Account getOauthAccountByName... |
@Test public void testGenerateDBCredentialsReturnsCorrectBytesForSyncByProvider() { Mockito.doReturn(SyncFilter.PROVIDER).when(syncConfiguration).getEncryptionParam(); byte[] bytes = credentialsHelper.generateDBCredentials(TEST_DUMMY_PASSWORD, userInfo); Assert.assertTrue(Arrays.equals(SecurityHelper.toBytes(TEST_DUMMY... | public byte[] generateDBCredentials(char[] password, LoginResponseData userInfo) { char[] encryptionParamValue = null; SyncConfiguration syncConfiguration = CoreLibrary.getInstance().getSyncConfiguration(); if (syncConfiguration.getEncryptionParam() != null) { SyncFilter syncFilter = syncConfiguration.getEncryptionPara... | CredentialsHelper { public byte[] generateDBCredentials(char[] password, LoginResponseData userInfo) { char[] encryptionParamValue = null; SyncConfiguration syncConfiguration = CoreLibrary.getInstance().getSyncConfiguration(); if (syncConfiguration.getEncryptionParam() != null) { SyncFilter syncFilter = syncConfigurati... | CredentialsHelper { public byte[] generateDBCredentials(char[] password, LoginResponseData userInfo) { char[] encryptionParamValue = null; SyncConfiguration syncConfiguration = CoreLibrary.getInstance().getSyncConfiguration(); if (syncConfiguration.getEncryptionParam() != null) { SyncFilter syncFilter = syncConfigurati... | CredentialsHelper { public byte[] generateDBCredentials(char[] password, LoginResponseData userInfo) { char[] encryptionParamValue = null; SyncConfiguration syncConfiguration = CoreLibrary.getInstance().getSyncConfiguration(); if (syncConfiguration.getEncryptionParam() != null) { SyncFilter syncFilter = syncConfigurati... | CredentialsHelper { public byte[] generateDBCredentials(char[] password, LoginResponseData userInfo) { char[] encryptionParamValue = null; SyncConfiguration syncConfiguration = CoreLibrary.getInstance().getSyncConfiguration(); if (syncConfiguration.getEncryptionParam() != null) { SyncFilter syncFilter = syncConfigurati... |
@Test public void testReAuthenticateUserAfterSessionExpired() { Account account = new Account(CORE_ACCOUNT_NAME, CORE_ACCOUNT_TYPE); Mockito.doReturn(Mockito.mock(AccountManagerFuture.class)).when(accountManager).updateCredentials(account, AUTH_TOKEN_TYPE, null, null, null, null); AccountManagerFuture<Bundle> reAuthent... | public static AccountManagerFuture<Bundle> reAuthenticateUserAfterSessionExpired(String accountName, String accountType, String authTokenType) { Account account = getOauthAccountByNameAndType(accountName, accountType); return accountManager.updateCredentials(account, authTokenType, null, null, null, null); } | AccountHelper { public static AccountManagerFuture<Bundle> reAuthenticateUserAfterSessionExpired(String accountName, String accountType, String authTokenType) { Account account = getOauthAccountByNameAndType(accountName, accountType); return accountManager.updateCredentials(account, authTokenType, null, null, null, nul... | AccountHelper { public static AccountManagerFuture<Bundle> reAuthenticateUserAfterSessionExpired(String accountName, String accountType, String authTokenType) { Account account = getOauthAccountByNameAndType(accountName, accountType); return accountManager.updateCredentials(account, authTokenType, null, null, null, nul... | AccountHelper { public static AccountManagerFuture<Bundle> reAuthenticateUserAfterSessionExpired(String accountName, String accountType, String authTokenType) { Account account = getOauthAccountByNameAndType(accountName, accountType); return accountManager.updateCredentials(account, authTokenType, null, null, null, nul... | AccountHelper { public static AccountManagerFuture<Bundle> reAuthenticateUserAfterSessionExpired(String accountName, String accountType, String authTokenType) { Account account = getOauthAccountByNameAndType(accountName, accountType); return accountManager.updateCredentials(account, authTokenType, null, null, null, nul... |
@Test public void testOnCreateViewHolder() { LinearLayout vg = new LinearLayout(context); when(listItemProvider.createViewHolder(any())).thenReturn(mockViewHolder); RecyclerView.ViewHolder actualViewHolder = adapter.onCreateViewHolder(vg, RecyclerViewCursorAdapter.Type.ITEM.ordinal()); assertNotNull(actualViewHolder); ... | @NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { if (viewType == RecyclerViewCursorAdapter.Type.FOOTER.ordinal()) { return listItemProvider.createFooterHolder(parent); } else { return listItemProvider.createViewHolder(parent); } } | RecyclerViewPaginatedAdapter extends RecyclerViewCursorAdapter { @NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { if (viewType == RecyclerViewCursorAdapter.Type.FOOTER.ordinal()) { return listItemProvider.createFooterHolder(parent); } else { return listItemProvider.... | RecyclerViewPaginatedAdapter extends RecyclerViewCursorAdapter { @NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { if (viewType == RecyclerViewCursorAdapter.Type.FOOTER.ordinal()) { return listItemProvider.createFooterHolder(parent); } else { return listItemProvider.... | RecyclerViewPaginatedAdapter extends RecyclerViewCursorAdapter { @NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { if (viewType == RecyclerViewCursorAdapter.Type.FOOTER.ordinal()) { return listItemProvider.createFooterHolder(parent); } else { return listItemProvider.... | RecyclerViewPaginatedAdapter extends RecyclerViewCursorAdapter { @NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { if (viewType == RecyclerViewCursorAdapter.Type.FOOTER.ordinal()) { return listItemProvider.createFooterHolder(parent); } else { return listItemProvider.... |
@Test public void testOnCreateFooterHolder() { LinearLayout vg = new LinearLayout(context); when(listItemProvider.createFooterHolder(any())).thenReturn(mockViewHolder); RecyclerView.ViewHolder actualViewHolder = adapter.onCreateViewHolder(vg, RecyclerViewCursorAdapter.Type.FOOTER.ordinal()); assertNotNull(actualViewHol... | @NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { if (viewType == RecyclerViewCursorAdapter.Type.FOOTER.ordinal()) { return listItemProvider.createFooterHolder(parent); } else { return listItemProvider.createViewHolder(parent); } } | RecyclerViewPaginatedAdapter extends RecyclerViewCursorAdapter { @NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { if (viewType == RecyclerViewCursorAdapter.Type.FOOTER.ordinal()) { return listItemProvider.createFooterHolder(parent); } else { return listItemProvider.... | RecyclerViewPaginatedAdapter extends RecyclerViewCursorAdapter { @NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { if (viewType == RecyclerViewCursorAdapter.Type.FOOTER.ordinal()) { return listItemProvider.createFooterHolder(parent); } else { return listItemProvider.... | RecyclerViewPaginatedAdapter extends RecyclerViewCursorAdapter { @NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { if (viewType == RecyclerViewCursorAdapter.Type.FOOTER.ordinal()) { return listItemProvider.createFooterHolder(parent); } else { return listItemProvider.... | RecyclerViewPaginatedAdapter extends RecyclerViewCursorAdapter { @NonNull @Override public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { if (viewType == RecyclerViewCursorAdapter.Type.FOOTER.ordinal()) { return listItemProvider.createFooterHolder(parent); } else { return listItemProvider.... |
@Test public void testOnBindViewHolder() { String name = "John"; Map<String, String> details = new HashMap<>(); details.put("FWHOHFNAME", name); Map<String, String> columnmaps = new HashMap<>(); String idColumn = "baseEntityId"; columnmaps.put("id", idColumn); String caseId = "case 1"; String relationId = "identifier 1... | @Override public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, Cursor cursor) { if (listItemProvider.isFooterViewHolder(viewHolder)) { listItemProvider.getFooterView(viewHolder, getCurrentPageCount(), getTotalPageCount(), hasNextPage(), hasPreviousPage()); } else { CommonPersonObject personinlist = commonRe... | RecyclerViewPaginatedAdapter extends RecyclerViewCursorAdapter { @Override public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, Cursor cursor) { if (listItemProvider.isFooterViewHolder(viewHolder)) { listItemProvider.getFooterView(viewHolder, getCurrentPageCount(), getTotalPageCount(), hasNextPage(), hasPre... | RecyclerViewPaginatedAdapter extends RecyclerViewCursorAdapter { @Override public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, Cursor cursor) { if (listItemProvider.isFooterViewHolder(viewHolder)) { listItemProvider.getFooterView(viewHolder, getCurrentPageCount(), getTotalPageCount(), hasNextPage(), hasPre... | RecyclerViewPaginatedAdapter extends RecyclerViewCursorAdapter { @Override public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, Cursor cursor) { if (listItemProvider.isFooterViewHolder(viewHolder)) { listItemProvider.getFooterView(viewHolder, getCurrentPageCount(), getTotalPageCount(), hasNextPage(), hasPre... | RecyclerViewPaginatedAdapter extends RecyclerViewCursorAdapter { @Override public void onBindViewHolder(RecyclerView.ViewHolder viewHolder, Cursor cursor) { if (listItemProvider.isFooterViewHolder(viewHolder)) { listItemProvider.getFooterView(viewHolder, getCurrentPageCount(), getTotalPageCount(), hasNextPage(), hasPre... |
@Test public void shouldNotDownloadIfThereIsNoPendingForms() throws Exception { Mockito.when(formsVersionRepository.getAllFormWithSyncStatus(SyncStatus.PENDING)).thenReturn( Collections.<FormDefinitionVersion>emptyList()); DownloadStatus status = service.downloadAllPendingFormFromServer(); Assert.assertEquals(status, D... | public DownloadStatus downloadAllPendingFormFromServer() { DownloadStatus status = DownloadStatus.nothingDownloaded; List<FormDefinitionVersion> pendingFormList = formsVersionRepository. getAllFormWithSyncStatus(SyncStatus.PENDING); if (pendingFormList.isEmpty()) { return status; } else { for (FormDefinitionVersion l :... | AllFormVersionSyncService { public DownloadStatus downloadAllPendingFormFromServer() { DownloadStatus status = DownloadStatus.nothingDownloaded; List<FormDefinitionVersion> pendingFormList = formsVersionRepository. getAllFormWithSyncStatus(SyncStatus.PENDING); if (pendingFormList.isEmpty()) { return status; } else { fo... | AllFormVersionSyncService { public DownloadStatus downloadAllPendingFormFromServer() { DownloadStatus status = DownloadStatus.nothingDownloaded; List<FormDefinitionVersion> pendingFormList = formsVersionRepository. getAllFormWithSyncStatus(SyncStatus.PENDING); if (pendingFormList.isEmpty()) { return status; } else { fo... | AllFormVersionSyncService { public DownloadStatus downloadAllPendingFormFromServer() { DownloadStatus status = DownloadStatus.nothingDownloaded; List<FormDefinitionVersion> pendingFormList = formsVersionRepository. getAllFormWithSyncStatus(SyncStatus.PENDING); if (pendingFormList.isEmpty()) { return status; } else { fo... | AllFormVersionSyncService { public DownloadStatus downloadAllPendingFormFromServer() { DownloadStatus status = DownloadStatus.nothingDownloaded; List<FormDefinitionVersion> pendingFormList = formsVersionRepository. getAllFormWithSyncStatus(SyncStatus.PENDING); if (pendingFormList.isEmpty()) { return status; } else { fo... |
@Test public void shouldDownloadIfThereIsAPendingForms() throws Exception { Mockito.when(formsVersionRepository.getAllFormWithSyncStatus(SyncStatus.PENDING)).thenReturn( this.expectedFormDefinitionVersion); Mockito.when(httpAgent.downloadFromUrl("http: "ec_dir.zip")).thenReturn(DownloadStatus.downloaded); DownloadStatu... | public DownloadStatus downloadAllPendingFormFromServer() { DownloadStatus status = DownloadStatus.nothingDownloaded; List<FormDefinitionVersion> pendingFormList = formsVersionRepository. getAllFormWithSyncStatus(SyncStatus.PENDING); if (pendingFormList.isEmpty()) { return status; } else { for (FormDefinitionVersion l :... | AllFormVersionSyncService { public DownloadStatus downloadAllPendingFormFromServer() { DownloadStatus status = DownloadStatus.nothingDownloaded; List<FormDefinitionVersion> pendingFormList = formsVersionRepository. getAllFormWithSyncStatus(SyncStatus.PENDING); if (pendingFormList.isEmpty()) { return status; } else { fo... | AllFormVersionSyncService { public DownloadStatus downloadAllPendingFormFromServer() { DownloadStatus status = DownloadStatus.nothingDownloaded; List<FormDefinitionVersion> pendingFormList = formsVersionRepository. getAllFormWithSyncStatus(SyncStatus.PENDING); if (pendingFormList.isEmpty()) { return status; } else { fo... | AllFormVersionSyncService { public DownloadStatus downloadAllPendingFormFromServer() { DownloadStatus status = DownloadStatus.nothingDownloaded; List<FormDefinitionVersion> pendingFormList = formsVersionRepository. getAllFormWithSyncStatus(SyncStatus.PENDING); if (pendingFormList.isEmpty()) { return status; } else { fo... | AllFormVersionSyncService { public DownloadStatus downloadAllPendingFormFromServer() { DownloadStatus status = DownloadStatus.nothingDownloaded; List<FormDefinitionVersion> pendingFormList = formsVersionRepository. getAllFormWithSyncStatus(SyncStatus.PENDING); if (pendingFormList.isEmpty()) { return status; } else { fo... |
@Test public void shouldUpdateVersionIfThereIsNewerVersion() throws Exception { String jsonObject = "{\"formVersions\" : [{\"formName\": \"EC_ENGKAN\", \"formDirName\": " + "\"ec_dir\", \"formDataDefinitionVersion\": \"3\"}] }"; Mockito.when(httpAgent.fetch("http: new Response<String>( success, jsonObject)); List<FormD... | public FetchStatus pullFormDefinitionFromServer() { FetchStatus status = FetchStatus.nothingFetched; String baseUrl = configuration.dristhiBaseURL(); String uri = baseUrl + AllConstants.ALL_FORM_VERSION_URL; Response<String> response = httpAgent.fetch(uri); if (response.isFailure()) { logError("Form definition pull err... | AllFormVersionSyncService { public FetchStatus pullFormDefinitionFromServer() { FetchStatus status = FetchStatus.nothingFetched; String baseUrl = configuration.dristhiBaseURL(); String uri = baseUrl + AllConstants.ALL_FORM_VERSION_URL; Response<String> response = httpAgent.fetch(uri); if (response.isFailure()) { logErr... | AllFormVersionSyncService { public FetchStatus pullFormDefinitionFromServer() { FetchStatus status = FetchStatus.nothingFetched; String baseUrl = configuration.dristhiBaseURL(); String uri = baseUrl + AllConstants.ALL_FORM_VERSION_URL; Response<String> response = httpAgent.fetch(uri); if (response.isFailure()) { logErr... | AllFormVersionSyncService { public FetchStatus pullFormDefinitionFromServer() { FetchStatus status = FetchStatus.nothingFetched; String baseUrl = configuration.dristhiBaseURL(); String uri = baseUrl + AllConstants.ALL_FORM_VERSION_URL; Response<String> response = httpAgent.fetch(uri); if (response.isFailure()) { logErr... | AllFormVersionSyncService { public FetchStatus pullFormDefinitionFromServer() { FetchStatus status = FetchStatus.nothingFetched; String baseUrl = configuration.dristhiBaseURL(); String uri = baseUrl + AllConstants.ALL_FORM_VERSION_URL; Response<String> response = httpAgent.fetch(uri); if (response.isFailure()) { logErr... |
@Test public void shouldNotUpdateIfLocalFormIsTheLatestVersion() throws Exception { String jsonObject = "{\"formVersions\" : [{\"formName\": \"EC_ENGKAN\", \"formDirName\":" + " \"ec_dir\", \"formDataDefinitionVersion\": \"2\"}] }"; Mockito.when(httpAgent.fetch("http: new Response<String>( success, jsonObject)); List<F... | public FetchStatus pullFormDefinitionFromServer() { FetchStatus status = FetchStatus.nothingFetched; String baseUrl = configuration.dristhiBaseURL(); String uri = baseUrl + AllConstants.ALL_FORM_VERSION_URL; Response<String> response = httpAgent.fetch(uri); if (response.isFailure()) { logError("Form definition pull err... | AllFormVersionSyncService { public FetchStatus pullFormDefinitionFromServer() { FetchStatus status = FetchStatus.nothingFetched; String baseUrl = configuration.dristhiBaseURL(); String uri = baseUrl + AllConstants.ALL_FORM_VERSION_URL; Response<String> response = httpAgent.fetch(uri); if (response.isFailure()) { logErr... | AllFormVersionSyncService { public FetchStatus pullFormDefinitionFromServer() { FetchStatus status = FetchStatus.nothingFetched; String baseUrl = configuration.dristhiBaseURL(); String uri = baseUrl + AllConstants.ALL_FORM_VERSION_URL; Response<String> response = httpAgent.fetch(uri); if (response.isFailure()) { logErr... | AllFormVersionSyncService { public FetchStatus pullFormDefinitionFromServer() { FetchStatus status = FetchStatus.nothingFetched; String baseUrl = configuration.dristhiBaseURL(); String uri = baseUrl + AllConstants.ALL_FORM_VERSION_URL; Response<String> response = httpAgent.fetch(uri); if (response.isFailure()) { logErr... | AllFormVersionSyncService { public FetchStatus pullFormDefinitionFromServer() { FetchStatus status = FetchStatus.nothingFetched; String baseUrl = configuration.dristhiBaseURL(); String uri = baseUrl + AllConstants.ALL_FORM_VERSION_URL; Response<String> response = httpAgent.fetch(uri); if (response.isFailure()) { logErr... |
@Test public void shouldCreateTimelineEventWhenECIsRegistered() throws Exception { FormSubmission submission = Mockito.mock(FormSubmission.class); Mockito.when(submission.entityId()).thenReturn("entity id 1"); Mockito.when(submission.getFieldValue("submissionDate")).thenReturn("2012-01-01"); service.register(submission... | public void register(FormSubmission submission) { if (isNotBlank(submission.getFieldValue(AllConstants.CommonFormFields.SUBMISSION_DATE))) { allTimelineEvents.add(TimelineEvent.forECRegistered(submission.entityId(), submission.getFieldValue(AllConstants.CommonFormFields.SUBMISSION_DATE))); } } | EligibleCoupleService { public void register(FormSubmission submission) { if (isNotBlank(submission.getFieldValue(AllConstants.CommonFormFields.SUBMISSION_DATE))) { allTimelineEvents.add(TimelineEvent.forECRegistered(submission.entityId(), submission.getFieldValue(AllConstants.CommonFormFields.SUBMISSION_DATE))); } } } | EligibleCoupleService { public void register(FormSubmission submission) { if (isNotBlank(submission.getFieldValue(AllConstants.CommonFormFields.SUBMISSION_DATE))) { allTimelineEvents.add(TimelineEvent.forECRegistered(submission.entityId(), submission.getFieldValue(AllConstants.CommonFormFields.SUBMISSION_DATE))); } } E... | EligibleCoupleService { public void register(FormSubmission submission) { if (isNotBlank(submission.getFieldValue(AllConstants.CommonFormFields.SUBMISSION_DATE))) { allTimelineEvents.add(TimelineEvent.forECRegistered(submission.entityId(), submission.getFieldValue(AllConstants.CommonFormFields.SUBMISSION_DATE))); } } E... | EligibleCoupleService { public void register(FormSubmission submission) { if (isNotBlank(submission.getFieldValue(AllConstants.CommonFormFields.SUBMISSION_DATE))) { allTimelineEvents.add(TimelineEvent.forECRegistered(submission.entityId(), submission.getFieldValue(AllConstants.CommonFormFields.SUBMISSION_DATE))); } } E... |
@Test public void shouldCloseEC() throws Exception { FormSubmission submission = Mockito.mock(FormSubmission.class); Mockito.when(submission.entityId()).thenReturn("entity id 1"); service.closeEligibleCouple(submission); Mockito.verify(allEligibleCouples).close("entity id 1"); Mockito.verify(allBeneficiaries).closeAllM... | public void closeEligibleCouple(FormSubmission submission) { allEligibleCouples.close(submission.entityId()); allBeneficiaries.closeAllMothersForEC(submission.entityId()); } | EligibleCoupleService { public void closeEligibleCouple(FormSubmission submission) { allEligibleCouples.close(submission.entityId()); allBeneficiaries.closeAllMothersForEC(submission.entityId()); } } | EligibleCoupleService { public void closeEligibleCouple(FormSubmission submission) { allEligibleCouples.close(submission.entityId()); allBeneficiaries.closeAllMothersForEC(submission.entityId()); } EligibleCoupleService(AllEligibleCouples allEligibleCouples, AllTimelineEvents
allTimelineEvents, AllBeneficia... | EligibleCoupleService { public void closeEligibleCouple(FormSubmission submission) { allEligibleCouples.close(submission.entityId()); allBeneficiaries.closeAllMothersForEC(submission.entityId()); } EligibleCoupleService(AllEligibleCouples allEligibleCouples, AllTimelineEvents
allTimelineEvents, AllBeneficia... | EligibleCoupleService { public void closeEligibleCouple(FormSubmission submission) { allEligibleCouples.close(submission.entityId()); allBeneficiaries.closeAllMothersForEC(submission.entityId()); } EligibleCoupleService(AllEligibleCouples allEligibleCouples, AllTimelineEvents
allTimelineEvents, AllBeneficia... |
@Test public void testGenerateDBCredentialsReturnsCorrectBytesForSyncByTeam() { Mockito.doReturn(SyncFilter.TEAM_ID).when(syncConfiguration).getEncryptionParam(); Mockito.doReturn(TEST_TEAM_ID).when(userService).getUserDefaultTeamId(userInfo); byte[] bytes = credentialsHelper.generateDBCredentials(TEST_DUMMY_PASSWORD, ... | public byte[] generateDBCredentials(char[] password, LoginResponseData userInfo) { char[] encryptionParamValue = null; SyncConfiguration syncConfiguration = CoreLibrary.getInstance().getSyncConfiguration(); if (syncConfiguration.getEncryptionParam() != null) { SyncFilter syncFilter = syncConfiguration.getEncryptionPara... | CredentialsHelper { public byte[] generateDBCredentials(char[] password, LoginResponseData userInfo) { char[] encryptionParamValue = null; SyncConfiguration syncConfiguration = CoreLibrary.getInstance().getSyncConfiguration(); if (syncConfiguration.getEncryptionParam() != null) { SyncFilter syncFilter = syncConfigurati... | CredentialsHelper { public byte[] generateDBCredentials(char[] password, LoginResponseData userInfo) { char[] encryptionParamValue = null; SyncConfiguration syncConfiguration = CoreLibrary.getInstance().getSyncConfiguration(); if (syncConfiguration.getEncryptionParam() != null) { SyncFilter syncFilter = syncConfigurati... | CredentialsHelper { public byte[] generateDBCredentials(char[] password, LoginResponseData userInfo) { char[] encryptionParamValue = null; SyncConfiguration syncConfiguration = CoreLibrary.getInstance().getSyncConfiguration(); if (syncConfiguration.getEncryptionParam() != null) { SyncFilter syncFilter = syncConfigurati... | CredentialsHelper { public byte[] generateDBCredentials(char[] password, LoginResponseData userInfo) { char[] encryptionParamValue = null; SyncConfiguration syncConfiguration = CoreLibrary.getInstance().getSyncConfiguration(); if (syncConfiguration.getEncryptionParam() != null) { SyncFilter syncFilter = syncConfigurati... |
@Test public void shouldNotCreateTimelineEventWhenECIsRegisteredWithoutSubmissionDate() throws Exception { FormSubmission submission = Mockito.mock(FormSubmission.class); Mockito.when(submission.entityId()).thenReturn("entity id 1"); Mockito.when(submission.getFieldValue("submissionDate")).thenReturn(null); service.reg... | public void register(FormSubmission submission) { if (isNotBlank(submission.getFieldValue(AllConstants.CommonFormFields.SUBMISSION_DATE))) { allTimelineEvents.add(TimelineEvent.forECRegistered(submission.entityId(), submission.getFieldValue(AllConstants.CommonFormFields.SUBMISSION_DATE))); } } | EligibleCoupleService { public void register(FormSubmission submission) { if (isNotBlank(submission.getFieldValue(AllConstants.CommonFormFields.SUBMISSION_DATE))) { allTimelineEvents.add(TimelineEvent.forECRegistered(submission.entityId(), submission.getFieldValue(AllConstants.CommonFormFields.SUBMISSION_DATE))); } } } | EligibleCoupleService { public void register(FormSubmission submission) { if (isNotBlank(submission.getFieldValue(AllConstants.CommonFormFields.SUBMISSION_DATE))) { allTimelineEvents.add(TimelineEvent.forECRegistered(submission.entityId(), submission.getFieldValue(AllConstants.CommonFormFields.SUBMISSION_DATE))); } } E... | EligibleCoupleService { public void register(FormSubmission submission) { if (isNotBlank(submission.getFieldValue(AllConstants.CommonFormFields.SUBMISSION_DATE))) { allTimelineEvents.add(TimelineEvent.forECRegistered(submission.entityId(), submission.getFieldValue(AllConstants.CommonFormFields.SUBMISSION_DATE))); } } E... | EligibleCoupleService { public void register(FormSubmission submission) { if (isNotBlank(submission.getFieldValue(AllConstants.CommonFormFields.SUBMISSION_DATE))) { allTimelineEvents.add(TimelineEvent.forECRegistered(submission.entityId(), submission.getFieldValue(AllConstants.CommonFormFields.SUBMISSION_DATE))); } } E... |
@Test public void shouldCreateTimelineEventAndUpdateEntityWhenFPChangeIsReported() throws Exception { FormSubmission submission = Mockito.mock(FormSubmission.class); Mockito.when(submission.entityId()).thenReturn("entity id 1"); Mockito.when(submission.getFieldValue("currentMethod")).thenReturn("condom"); Mockito.when(... | public void fpChange(FormSubmission submission) { String fpMethodChangeDate = submission.getFieldValue( AllConstants.ECRegistrationFields.FAMILY_PLANNING_METHOD_CHANGE_DATE); if (isBlank(fpMethodChangeDate)) { fpMethodChangeDate = submission .getFieldValue(AllConstants.CommonFormFields.SUBMISSION_DATE); } allTimelineEv... | EligibleCoupleService { public void fpChange(FormSubmission submission) { String fpMethodChangeDate = submission.getFieldValue( AllConstants.ECRegistrationFields.FAMILY_PLANNING_METHOD_CHANGE_DATE); if (isBlank(fpMethodChangeDate)) { fpMethodChangeDate = submission .getFieldValue(AllConstants.CommonFormFields.SUBMISSIO... | EligibleCoupleService { public void fpChange(FormSubmission submission) { String fpMethodChangeDate = submission.getFieldValue( AllConstants.ECRegistrationFields.FAMILY_PLANNING_METHOD_CHANGE_DATE); if (isBlank(fpMethodChangeDate)) { fpMethodChangeDate = submission .getFieldValue(AllConstants.CommonFormFields.SUBMISSIO... | EligibleCoupleService { public void fpChange(FormSubmission submission) { String fpMethodChangeDate = submission.getFieldValue( AllConstants.ECRegistrationFields.FAMILY_PLANNING_METHOD_CHANGE_DATE); if (isBlank(fpMethodChangeDate)) { fpMethodChangeDate = submission .getFieldValue(AllConstants.CommonFormFields.SUBMISSIO... | EligibleCoupleService { public void fpChange(FormSubmission submission) { String fpMethodChangeDate = submission.getFieldValue( AllConstants.ECRegistrationFields.FAMILY_PLANNING_METHOD_CHANGE_DATE); if (isBlank(fpMethodChangeDate)) { fpMethodChangeDate = submission .getFieldValue(AllConstants.CommonFormFields.SUBMISSIO... |
@Test public void shouldUseFormSubmissionDateAsChangeDateWhenFPMethodIsChangedAndChangeDateIsBlank() throws Exception { FormSubmission submission = Mockito.mock(FormSubmission.class); Mockito.when(submission.entityId()).thenReturn("entity id 1"); Mockito.when(submission.getFieldValue("currentMethod")).thenReturn("condo... | public void fpChange(FormSubmission submission) { String fpMethodChangeDate = submission.getFieldValue( AllConstants.ECRegistrationFields.FAMILY_PLANNING_METHOD_CHANGE_DATE); if (isBlank(fpMethodChangeDate)) { fpMethodChangeDate = submission .getFieldValue(AllConstants.CommonFormFields.SUBMISSION_DATE); } allTimelineEv... | EligibleCoupleService { public void fpChange(FormSubmission submission) { String fpMethodChangeDate = submission.getFieldValue( AllConstants.ECRegistrationFields.FAMILY_PLANNING_METHOD_CHANGE_DATE); if (isBlank(fpMethodChangeDate)) { fpMethodChangeDate = submission .getFieldValue(AllConstants.CommonFormFields.SUBMISSIO... | EligibleCoupleService { public void fpChange(FormSubmission submission) { String fpMethodChangeDate = submission.getFieldValue( AllConstants.ECRegistrationFields.FAMILY_PLANNING_METHOD_CHANGE_DATE); if (isBlank(fpMethodChangeDate)) { fpMethodChangeDate = submission .getFieldValue(AllConstants.CommonFormFields.SUBMISSIO... | EligibleCoupleService { public void fpChange(FormSubmission submission) { String fpMethodChangeDate = submission.getFieldValue( AllConstants.ECRegistrationFields.FAMILY_PLANNING_METHOD_CHANGE_DATE); if (isBlank(fpMethodChangeDate)) { fpMethodChangeDate = submission .getFieldValue(AllConstants.CommonFormFields.SUBMISSIO... | EligibleCoupleService { public void fpChange(FormSubmission submission) { String fpMethodChangeDate = submission.getFieldValue( AllConstants.ECRegistrationFields.FAMILY_PLANNING_METHOD_CHANGE_DATE); if (isBlank(fpMethodChangeDate)) { fpMethodChangeDate = submission .getFieldValue(AllConstants.CommonFormFields.SUBMISSIO... |
@Test public void convertManifestDTOToManifest() throws JSONException { String manifestDTOJson = "{\"json\":\"{\\\"forms_version\\\":\\\"0.0.1\\\",\\\"identifiers\\\":[\\\"anc/member_registration.json\\\",\\\"anc/pregnancy_outcome.json\\\"]}\",\"appId\":\"org.smartregister.chw\",\"appVersion\":\"0.0.1\",\"id\":1}"; Man... | protected Manifest convertManifestDTOToManifest(ManifestDTO manifestDTO) throws JSONException { Manifest manifest = new Manifest(); manifest.setVersion(manifestDTO.getIdentifier()); manifest.setAppVersion(manifestDTO.getAppVersion()); manifest.setCreatedAt(manifestDTO.getCreatedAt()); JSONObject json = new JSONObject(m... | DocumentConfigurationService { protected Manifest convertManifestDTOToManifest(ManifestDTO manifestDTO) throws JSONException { Manifest manifest = new Manifest(); manifest.setVersion(manifestDTO.getIdentifier()); manifest.setAppVersion(manifestDTO.getAppVersion()); manifest.setCreatedAt(manifestDTO.getCreatedAt()); JSO... | DocumentConfigurationService { protected Manifest convertManifestDTOToManifest(ManifestDTO manifestDTO) throws JSONException { Manifest manifest = new Manifest(); manifest.setVersion(manifestDTO.getIdentifier()); manifest.setAppVersion(manifestDTO.getAppVersion()); manifest.setCreatedAt(manifestDTO.getCreatedAt()); JSO... | DocumentConfigurationService { protected Manifest convertManifestDTOToManifest(ManifestDTO manifestDTO) throws JSONException { Manifest manifest = new Manifest(); manifest.setVersion(manifestDTO.getIdentifier()); manifest.setAppVersion(manifestDTO.getAppVersion()); manifest.setCreatedAt(manifestDTO.getCreatedAt()); JSO... | DocumentConfigurationService { protected Manifest convertManifestDTOToManifest(ManifestDTO manifestDTO) throws JSONException { Manifest manifest = new Manifest(); manifest.setVersion(manifestDTO.getIdentifier()); manifest.setAppVersion(manifestDTO.getAppVersion()); manifest.setCreatedAt(manifestDTO.getCreatedAt()); JSO... |
@Test public void convertClientFormResponseToClientForm() throws JSONException { String clientFormResponseJson = "{\"clientForm\":{\"id\":3,\"json\":\"\\\"{\\\\n \\\\\\\"form\\\\\\\": \\\\\\\"ANC Referral\\\\\\\",\\\\n \\\\\\\"count\\\\\\\": \\\\\\\"1\\\\\\\",\\\\n \\\\\\\"encounter_type\\\\\\\": \\\\\\\"ANC Referral\\... | protected ClientForm convertClientFormResponseToClientForm(ClientFormResponse clientFormResponse) { ClientForm clientForm = new ClientForm(); clientForm.setId(clientFormResponse.getClientForm().getId()); clientForm.setCreatedAt(clientFormResponse.getClientFormMetadata().getCreatedAt()); clientForm.setIdentifier(clientF... | DocumentConfigurationService { protected ClientForm convertClientFormResponseToClientForm(ClientFormResponse clientFormResponse) { ClientForm clientForm = new ClientForm(); clientForm.setId(clientFormResponse.getClientForm().getId()); clientForm.setCreatedAt(clientFormResponse.getClientFormMetadata().getCreatedAt()); c... | DocumentConfigurationService { protected ClientForm convertClientFormResponseToClientForm(ClientFormResponse clientFormResponse) { ClientForm clientForm = new ClientForm(); clientForm.setId(clientFormResponse.getClientForm().getId()); clientForm.setCreatedAt(clientFormResponse.getClientFormMetadata().getCreatedAt()); c... | DocumentConfigurationService { protected ClientForm convertClientFormResponseToClientForm(ClientFormResponse clientFormResponse) { ClientForm clientForm = new ClientForm(); clientForm.setId(clientFormResponse.getClientForm().getId()); clientForm.setCreatedAt(clientFormResponse.getClientFormMetadata().getCreatedAt()); c... | DocumentConfigurationService { protected ClientForm convertClientFormResponseToClientForm(ClientFormResponse clientFormResponse) { ClientForm clientForm = new ClientForm(); clientForm.setId(clientFormResponse.getClientForm().getId()); clientForm.setCreatedAt(clientFormResponse.getClientFormMetadata().getCreatedAt()); c... |
@Test public void fetchClientForm() { String manifestJson = "{\"identifiers\":[\"referrals/anc_referral_form\"],\"formVersion\":\"0.0.8\",\"appVersion\":\"0.2.0\",\"createdAt\":\"2020-04-23T16:28:19.879+03:00\"}"; Gson gson = new GsonBuilder().setDateFormat("MMM dd, yyyy, hh:mm:ss aaa").create(); Manifest activeManifes... | protected void fetchClientForm(String identifier, String formVersion, ClientForm latestClientForm) throws NoHttpResponseException { if (httpAgent == null) { throw new IllegalArgumentException(CLIENT_FORM_SYNC_URL + " http agent is null"); } String baseUrl = getBaseUrl(); Response resp = httpAgent.fetch( MessageFormat.f... | DocumentConfigurationService { protected void fetchClientForm(String identifier, String formVersion, ClientForm latestClientForm) throws NoHttpResponseException { if (httpAgent == null) { throw new IllegalArgumentException(CLIENT_FORM_SYNC_URL + " http agent is null"); } String baseUrl = getBaseUrl(); Response resp = h... | DocumentConfigurationService { protected void fetchClientForm(String identifier, String formVersion, ClientForm latestClientForm) throws NoHttpResponseException { if (httpAgent == null) { throw new IllegalArgumentException(CLIENT_FORM_SYNC_URL + " http agent is null"); } String baseUrl = getBaseUrl(); Response resp = h... | DocumentConfigurationService { protected void fetchClientForm(String identifier, String formVersion, ClientForm latestClientForm) throws NoHttpResponseException { if (httpAgent == null) { throw new IllegalArgumentException(CLIENT_FORM_SYNC_URL + " http agent is null"); } String baseUrl = getBaseUrl(); Response resp = h... | DocumentConfigurationService { protected void fetchClientForm(String identifier, String formVersion, ClientForm latestClientForm) throws NoHttpResponseException { if (httpAgent == null) { throw new IllegalArgumentException(CLIENT_FORM_SYNC_URL + " http agent is null"); } String baseUrl = getBaseUrl(); Response resp = h... |
@Test public void saveManifestVersionShouldSaveVersionInSharedPreferences() { Assert.assertNull(CoreLibrary.getInstance().context().allSharedPreferences().fetchManifestVersion()); String manifestVersion = "0.0.89"; documentConfigurationService.saveManifestVersion(manifestVersion); Assert.assertEquals(manifestVersion, C... | @VisibleForTesting protected void saveManifestVersion(@NonNull String manifestVersion) { boolean manifestVersionSaved = CoreLibrary.getInstance() .context() .allSharedPreferences() .saveManifestVersion(manifestVersion); if (!manifestVersionSaved) { Timber.e(new Exception("Saving manifest version failed")); } } | DocumentConfigurationService { @VisibleForTesting protected void saveManifestVersion(@NonNull String manifestVersion) { boolean manifestVersionSaved = CoreLibrary.getInstance() .context() .allSharedPreferences() .saveManifestVersion(manifestVersion); if (!manifestVersionSaved) { Timber.e(new Exception("Saving manifest ... | DocumentConfigurationService { @VisibleForTesting protected void saveManifestVersion(@NonNull String manifestVersion) { boolean manifestVersionSaved = CoreLibrary.getInstance() .context() .allSharedPreferences() .saveManifestVersion(manifestVersion); if (!manifestVersionSaved) { Timber.e(new Exception("Saving manifest ... | DocumentConfigurationService { @VisibleForTesting protected void saveManifestVersion(@NonNull String manifestVersion) { boolean manifestVersionSaved = CoreLibrary.getInstance() .context() .allSharedPreferences() .saveManifestVersion(manifestVersion); if (!manifestVersionSaved) { Timber.e(new Exception("Saving manifest ... | DocumentConfigurationService { @VisibleForTesting protected void saveManifestVersion(@NonNull String manifestVersion) { boolean manifestVersionSaved = CoreLibrary.getInstance() .context() .allSharedPreferences() .saveManifestVersion(manifestVersion); if (!manifestVersionSaved) { Timber.e(new Exception("Saving manifest ... |
@Test public void testGenerateDBCredentialsReturnsCorrectBytesForSyncByLocation() { Mockito.doReturn(SyncFilter.LOCATION_ID).when(syncConfiguration).getEncryptionParam(); Mockito.doReturn(TEST_LOCATION_ID).when(userService).getUserLocationId(userInfo); byte[] bytes = credentialsHelper.generateDBCredentials(TEST_DUMMY_P... | public byte[] generateDBCredentials(char[] password, LoginResponseData userInfo) { char[] encryptionParamValue = null; SyncConfiguration syncConfiguration = CoreLibrary.getInstance().getSyncConfiguration(); if (syncConfiguration.getEncryptionParam() != null) { SyncFilter syncFilter = syncConfiguration.getEncryptionPara... | CredentialsHelper { public byte[] generateDBCredentials(char[] password, LoginResponseData userInfo) { char[] encryptionParamValue = null; SyncConfiguration syncConfiguration = CoreLibrary.getInstance().getSyncConfiguration(); if (syncConfiguration.getEncryptionParam() != null) { SyncFilter syncFilter = syncConfigurati... | CredentialsHelper { public byte[] generateDBCredentials(char[] password, LoginResponseData userInfo) { char[] encryptionParamValue = null; SyncConfiguration syncConfiguration = CoreLibrary.getInstance().getSyncConfiguration(); if (syncConfiguration.getEncryptionParam() != null) { SyncFilter syncFilter = syncConfigurati... | CredentialsHelper { public byte[] generateDBCredentials(char[] password, LoginResponseData userInfo) { char[] encryptionParamValue = null; SyncConfiguration syncConfiguration = CoreLibrary.getInstance().getSyncConfiguration(); if (syncConfiguration.getEncryptionParam() != null) { SyncFilter syncFilter = syncConfigurati... | CredentialsHelper { public byte[] generateDBCredentials(char[] password, LoginResponseData userInfo) { char[] encryptionParamValue = null; SyncConfiguration syncConfiguration = CoreLibrary.getInstance().getSyncConfiguration(); if (syncConfiguration.getEncryptionParam() != null) { SyncFilter syncFilter = syncConfigurati... |
@Test public void shouldNotifyFormSubmittedListenersWhenFormIsHandled() throws Exception { FormSubmission formSubmission = create().withFormName("ec_registration").withInstanceId("instance id 1").withVersion("122").build(); when(formDataRepository.fetchFromSubmission("instance id 1")).thenReturn(formSubmission); FORM_S... | public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: " + submission); } else ... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... |
@Test public void shouldNotifyFormSubmittedListenersWhenThereIsNoHandlerForForm() throws Exception { FormSubmission formSubmission = create().withFormName("form-without-handler").withInstanceId("instance id 1").withVersion("122").build(); when(formDataRepository.fetchFromSubmission("instance id 1")).thenReturn(formSubm... | public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: " + submission); } else ... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... |
@Test public void testGetPropertyBooleanReturnsCorrectValue() { AppProperties properties = new AppProperties(); Boolean value = properties.getPropertyBoolean(PROP_KEY); Assert.assertNotNull(value); Assert.assertFalse(value); properties.setProperty(PROP_KEY, TEST_VAL_TRUE); value = properties.getPropertyBoolean(PROP_KEY... | public Boolean getPropertyBoolean(String key) { return Boolean.valueOf(getProperty(key)); } | AppProperties extends Properties { public Boolean getPropertyBoolean(String key) { return Boolean.valueOf(getProperty(key)); } } | AppProperties extends Properties { public Boolean getPropertyBoolean(String key) { return Boolean.valueOf(getProperty(key)); } } | AppProperties extends Properties { public Boolean getPropertyBoolean(String key) { return Boolean.valueOf(getProperty(key)); } Boolean getPropertyBoolean(String key); Boolean hasProperty(String key); Boolean isTrue(String key); } | AppProperties extends Properties { public Boolean getPropertyBoolean(String key) { return Boolean.valueOf(getProperty(key)); } Boolean getPropertyBoolean(String key); Boolean hasProperty(String key); Boolean isTrue(String key); } |
@Test public void shouldDelegateECRegistrationFormSubmissionHandlingToECRegistrationHandler() throws Exception { FormSubmission formSubmission = create().withFormName("ec_registration").withInstanceId("instance id 1").withVersion("122").build(); when(formDataRepository.fetchFromSubmission("instance id 1")).thenReturn(f... | public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: " + submission); } else ... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... |
@Test public void shouldDelegateFPComplicationsFormSubmissionHandlingToFPComplicationsHandler() throws Exception { FormSubmission formSubmission = create().withFormName("fp_complications").withInstanceId("instance id 2").withVersion("123").build(); when(formDataRepository.fetchFromSubmission("instance id 1")).thenRetur... | public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: " + submission); } else ... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... |
@Test public void shouldDelegateRenewFPProductFormSubmissionHandlingToRenewFPProductHandler() throws Exception { FormSubmission formSubmission = create().withFormName("renew_fp_product").withInstanceId("instance id 1").withVersion("122").build(); when(formDataRepository.fetchFromSubmission("instance id 1")).thenReturn(... | public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: " + submission); } else ... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... |
@Test public void shouldDelegateECCloseFormSubmissionHandlingToECCloseHandler() throws Exception { FormSubmission formSubmission = create().withFormName("ec_close").withInstanceId("instance id 1").withVersion("122").build(); when(formDataRepository.fetchFromSubmission("instance id 1")).thenReturn(formSubmission); route... | public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: " + submission); } else ... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... |
@Test public void shouldDelegateANCRegistrationFormSubmissionHandlingToANCRegistrationHandler() throws Exception { FormSubmission formSubmission = create().withFormName("anc_registration").withInstanceId("instance id 1").withVersion("122").build(); when(formDataRepository.fetchFromSubmission("instance id 1")).thenRetur... | public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: " + submission); } else ... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... | FormSubmissionRouter { public void route(String instanceId) throws Exception { FormSubmission submission = formDataRepository.fetchFromSubmission(instanceId); FormSubmissionHandler handler = handlerMap.get(submission.formName()); if (handler == null) { logWarn("Could not find a handler due to unknown form submission: "... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.