Class DataAccessServiceTest

java.lang.Object
org.diabetestechnology.drh.service.http.hub.prime.service.DataAccessServiceTest

@Disabled public class DataAccessServiceTest extends Object
  • Constructor Details

    • DataAccessServiceTest

      public DataAccessServiceTest()
  • Method Details

    • setUp

      @BeforeEach public void setUp()
    • testAttachDatabase

      @Test public void testAttachDatabase() throws Exception
      Throws:
      Exception
    • testAttachDatabase_Success

      @Test public void testAttachDatabase_Success() throws Exception
      Throws:
      Exception
    • testAttachDatabase_WhenFails

      @Test public void testAttachDatabase_WhenFails() throws Exception
      Throws:
      Exception
    • testCheckDatabaseAttachment_WhenNotFound

      @Test public void testCheckDatabaseAttachment_WhenNotFound() throws Exception
      Throws:
      Exception
    • testResponse

      @Test public void testResponse()
    • testRefreshDatabase_WhenNotAttached

      @Test public void testRefreshDatabase_WhenNotAttached() throws Exception
      Throws:
      Exception
    • testRefreshDatabase_WhenAlreadyAttached

      @Test public void testRefreshDatabase_WhenAlreadyAttached() throws Exception
      Throws:
      Exception
    • testGetParticipantCGMDates

      @Test public void testGetParticipantCGMDates() throws Exception
      Throws:
      Exception
    • testGetParticipantCGMDates_NoDataFound

      @Test public void testGetParticipantCGMDates_NoDataFound() throws Exception
      Throws:
      Exception
    • testGetParticipantCGMDates_DBNotAttached

      @Test public void testGetParticipantCGMDates_DBNotAttached()
    • testGetParticipantCGMDates_DataAccessException

      @Test public void testGetParticipantCGMDates_DataAccessException() throws Exception
      Throws:
      Exception
    • testGetCoefficientOfVariation_Success

      @Test public void testGetCoefficientOfVariation_Success() throws Exception
      Throws:
      Exception
    • testGetCoefficientOfVariation_DatabaseNotAttached

      @Test public void testGetCoefficientOfVariation_DatabaseNotAttached()
    • testGetCoefficientOfVariation_DataAccessException

      @Test public void testGetCoefficientOfVariation_DataAccessException() throws Exception
      Throws:
      Exception
    • testCalculateTimeAboveRangeVeryHigh

      @Test public void testCalculateTimeAboveRangeVeryHigh() throws Exception
      Throws:
      Exception
    • testCalculateTimeAboveRangeVeryHigh_DatabaseNotAttached

      @Test public void testCalculateTimeAboveRangeVeryHigh_DatabaseNotAttached() throws Exception
      Throws:
      Exception
    • testCalculateTimeAboveRangeVeryHigh_EmptyResult

      @Test public void testCalculateTimeAboveRangeVeryHigh_EmptyResult() throws Exception
      Throws:
      Exception
    • testCalculateTimeAboveRangeVeryHigh_DataAccessException

      @Test public void testCalculateTimeAboveRangeVeryHigh_DataAccessException() throws Exception
      Throws:
      Exception
    • testCalculateTimeInTightRange

      @Test public void testCalculateTimeInTightRange() throws Exception
      Throws:
      Exception
    • testCalculateTimeInTightRange_DatabaseNotAttached

      @Test public void testCalculateTimeInTightRange_DatabaseNotAttached() throws Exception
      Throws:
      Exception
    • testCalculateTimeInTightRange_EmptyResult

      @Test public void testCalculateTimeInTightRange_EmptyResult() throws Exception
      Throws:
      Exception
    • testCalculateTimeInTightRange_DataAccessException

      @Test public void testCalculateTimeInTightRange_DataAccessException() throws Exception
      Throws:
      Exception
    • testCalculateTimeAboveRangeHigh

      @Test public void testCalculateTimeAboveRangeHigh() throws Exception
      Throws:
      Exception
    • testCalculateTimeAboveRangeHigh_DatabaseNotAttached

      @Test public void testCalculateTimeAboveRangeHigh_DatabaseNotAttached() throws Exception
      Throws:
      Exception
    • testCalculateTimeAboveRangeHigh_EmptyResult

      @Test public void testCalculateTimeAboveRangeHigh_EmptyResult() throws Exception
      Throws:
      Exception
    • testCalculateTimeAboveRangeHigh_DataAccessException

      @Test public void testCalculateTimeAboveRangeHigh_DataAccessException() throws Exception
      Throws:
      Exception
    • testGlycemicRiskIndicator

      @Test public void testGlycemicRiskIndicator() throws Exception
      Throws:
      Exception
    • testGlycemicRiskIndicator_DatabaseNotAttached

      @Test public void testGlycemicRiskIndicator_DatabaseNotAttached() throws Exception
      Throws:
      Exception
    • testGlycemicRiskIndicator_DataAccessException

      @Test public void testGlycemicRiskIndicator_DataAccessException() throws Exception
      Throws:
      Exception
    • testLiabilityIndex

      @Test public void testLiabilityIndex() throws Exception
      Throws:
      Exception
    • testLiabilityIndex_DatabaseNotAttached

      @Test public void testLiabilityIndex_DatabaseNotAttached() throws Exception
      Throws:
      Exception
    • testLiabilityIndex_DataAccessException

      @Test public void testLiabilityIndex_DataAccessException() throws Exception
      Throws:
      Exception
    • testGetMeanAmplitude

      @Test public void testGetMeanAmplitude() throws Exception
      Throws:
      Exception
    • testGetMeanAmplitude_DatabaseNotAttached

      @Test public void testGetMeanAmplitude_DatabaseNotAttached() throws Exception
      Throws:
      Exception
    • testGetMeanAmplitude_DataAccessException

      @Test public void testGetMeanAmplitude_DataAccessException() throws Exception
      Throws:
      Exception
    • testGetMeanAmplitude_EmptyResult

      @Test public void testGetMeanAmplitude_EmptyResult() throws Exception
      Throws:
      Exception
    • testCalculateMValue

      @Test public void testCalculateMValue() throws Exception
      Throws:
      Exception
    • testCalculateMValue_DatabaseNotAttached

      @Test public void testCalculateMValue_DatabaseNotAttached() throws Exception
      Throws:
      Exception
    • testCalculateMValue_DataAccessException

      @Test public void testCalculateMValue_DataAccessException() throws Exception
      Throws:
      Exception
    • testCalculateMValue_EmptyResult

      @Test public void testCalculateMValue_EmptyResult() throws Exception
      Throws:
      Exception
    • testGetMeanGlucose

      @Test public void testGetMeanGlucose() throws Exception
      Throws:
      Exception
    • testGetMeanGlucose_DatabaseNotAttached

      @Test public void testGetMeanGlucose_DatabaseNotAttached() throws Exception
      Throws:
      Exception
    • testGetMeanGlucose_DataAccessException

      @Test public void testGetMeanGlucose_DataAccessException() throws Exception
      Throws:
      Exception
    • testGetNumberOfDaysCGMWorn

      @Test public void testGetNumberOfDaysCGMWorn() throws Exception
      Throws:
      Exception
    • testGetNumberOfDaysCGMWorn_DatabaseNotAttached

      @Test public void testGetNumberOfDaysCGMWorn_DatabaseNotAttached() throws Exception
      Throws:
      Exception
    • testGetNumberOfDaysCGMWorn_DataAccessException

      @Test public void testGetNumberOfDaysCGMWorn_DataAccessException() throws Exception
      Throws:
      Exception
    • testGetPercentageTimeCGMActive

      @Test public void testGetPercentageTimeCGMActive() throws Exception
      Throws:
      Exception
    • testGetPercentageTimeCGMActive_DatabaseNotAttached

      @Test public void testGetPercentageTimeCGMActive_DatabaseNotAttached() throws Exception
      Throws:
      Exception
    • testGetPercentageTimeCGMActive_DataAccessException

      @Test public void testGetPercentageTimeCGMActive_DataAccessException() throws Exception
      Throws:
      Exception
    • testGetGlucoseManagementIndicator

      @Test public void testGetGlucoseManagementIndicator() throws Exception
      Throws:
      Exception
    • testGetGlucoseManagementIndicator_DatabaseNotAttached

      @Test public void testGetGlucoseManagementIndicator_DatabaseNotAttached() throws Exception
      Throws:
      Exception
    • testGetGlucoseManagementIndicator_DataAccessException

      @Test public void testGetGlucoseManagementIndicator_DataAccessException() throws Exception
      Throws:
      Exception
    • testGetStudyParticipantDashboard

      @Test public void testGetStudyParticipantDashboard() throws Exception
      Throws:
      Exception
    • testGetStudyParticipantDashboard_DatabaseNotAttached

      @Test public void testGetStudyParticipantDashboard_DatabaseNotAttached() throws Exception
      Throws:
      Exception
    • testGetStudyDetails

      @Test public void testGetStudyDetails() throws Exception
      Throws:
      Exception
    • testGetStudyDetails_DatabaseNotAttached

      @Test public void testGetStudyDetails_DatabaseNotAttached() throws Exception
      Throws:
      Exception
    • testGetParticipantMetrics

      @Test public void testGetParticipantMetrics() throws Exception
      Throws:
      Exception
    • testGetParticipantMetrics_DatabaseNotAttached

      @Test public void testGetParticipantMetrics_DatabaseNotAttached() throws Exception
      Throws:
      Exception
    • testGetParticipantMetrics_DataAccessException

      @Test public void testGetParticipantMetrics_DataAccessException() throws Exception
      Throws:
      Exception
    • testGetTimeRangeStackedData

      @Test public void testGetTimeRangeStackedData() throws Exception
      Throws:
      Exception
    • testGetTimeRangeStackedData_DatabaseNotAttached

      @Test public void testGetTimeRangeStackedData_DatabaseNotAttached() throws Exception
      Throws:
      Exception
    • testGetTimeRangeStackedData_DataAccessException

      @Test public void testGetTimeRangeStackedData_DataAccessException() throws Exception
      Throws:
      Exception
    • testCalculateAverageDailyRisk

      @Test public void testCalculateAverageDailyRisk() throws Exception
      Throws:
      Exception
    • testCalculateAverageDailyRisk_DatabaseNotAttached

      @Test public void testCalculateAverageDailyRisk_DatabaseNotAttached() throws Exception
      Throws:
      Exception
    • testCalculateAverageDailyRisk_DataAccessException

      @Test public void testCalculateAverageDailyRisk_DataAccessException() throws Exception
      Throws:
      Exception
    • testCalculateAverageDailyRisk_NullResult

      @Test public void testCalculateAverageDailyRisk_NullResult() throws Exception
      Throws:
      Exception
    • testCalculateJIndex

      @Test public void testCalculateJIndex() throws Exception
      Throws:
      Exception
    • testCalculateJIndex_DatabaseNotAttached

      @Test public void testCalculateJIndex_DatabaseNotAttached() throws Exception
      Throws:
      Exception
    • testCalculateJIndex_DataAccessException

      @Test public void testCalculateJIndex_DataAccessException() throws Exception
      Throws:
      Exception
    • testCalculateLBGIandHBGI

      @Test public void testCalculateLBGIandHBGI() throws Exception
      Throws:
      Exception
    • testCalculateLBGIandHBGI_DatabaseNotAttached

      @Test public void testCalculateLBGIandHBGI_DatabaseNotAttached() throws Exception
      Throws:
      Exception
    • testCalculateLBGIandHBGI_DataAccessException

      @Test public void testCalculateLBGIandHBGI_DataAccessException() throws Exception
      Throws:
      Exception
    • testCalculateGRADE

      @Test public void testCalculateGRADE() throws Exception
      Throws:
      Exception
    • testCalculateGRADE_DatabaseNotAttached

      @Test public void testCalculateGRADE_DatabaseNotAttached() throws Exception
      Throws:
      Exception
    • testCalculateGRADE_DataAccessException

      @Test public void testCalculateGRADE_DataAccessException() throws Exception
      Throws:
      Exception
    • testCalculateMeanOfDailyDifferences

      @Test public void testCalculateMeanOfDailyDifferences() throws Exception
      Throws:
      Exception
    • testCalculateMeanOfDailyDifferences_DatabaseNotAttached

      @Test public void testCalculateMeanOfDailyDifferences_DatabaseNotAttached() throws Exception
      Throws:
      Exception
    • testCalculateMeanOfDailyDifferences_DataAccessException

      @Test public void testCalculateMeanOfDailyDifferences_DataAccessException() throws Exception
      Throws:
      Exception
    • testCalculateCONGA

      @Test public void testCalculateCONGA() throws Exception
      Throws:
      Exception
    • testCalculateCONGA_DatabaseNotAttached

      @Test public void testCalculateCONGA_DatabaseNotAttached() throws Exception
      Throws:
      Exception
    • testCalculateCONGA_DataAccessException

      @Test public void testCalculateCONGA_DataAccessException() throws Exception
      Throws:
      Exception
    • testReplacePlaceholders

      @Test public void testReplacePlaceholders()
    • testGetParticipantInfos

      @Test public void testGetParticipantInfos()
    • testCalculateTimeBelowRangeLow_NoData

      @Test public void testCalculateTimeBelowRangeLow_NoData() throws InterruptedException, ExecutionException
      Throws:
      InterruptedException
      ExecutionException
    • testCalculateTimeBelowRangeLow_RetryLogic

      @Test public void testCalculateTimeBelowRangeLow_RetryLogic() throws InterruptedException, ExecutionException
      Throws:
      InterruptedException
      ExecutionException
    • testCalculateTimeBelowRangeLow_Success

      @Test public void testCalculateTimeBelowRangeLow_Success() throws Exception
      Throws:
      Exception
    • testCalculateTimeBelowRangeLow_DatabaseNotAttached

      @Test public void testCalculateTimeBelowRangeLow_DatabaseNotAttached() throws Exception
      Throws:
      Exception
    • testGetFieldName_Success

      @Test public void testGetFieldName_Success() throws SQLException
      Throws:
      SQLException
    • testCommonResponseBuilder_Success

      @Test public void testCommonResponseBuilder_Success() throws Exception
      Throws:
      Exception
    • testResponseBuilder_SuccessWithData

      @Test public void testResponseBuilder_SuccessWithData()
    • testResponseBuilder_SuccessNoData

      @Test public void testResponseBuilder_SuccessNoData()
    • testResponseBuilder_Error

      @Test public void testResponseBuilder_Error()
    • testGetSortModel_AscendingSort

      @Test public void testGetSortModel_AscendingSort()
    • testGetSortModel_DescendingSort

      @Test public void testGetSortModel_DescendingSort()
    • testCreateCondition_LikeFilter

      @Test public void testCreateCondition_LikeFilter()
    • testCreateCondition_EqualsFilter

      @Test public void testCreateCondition_EqualsFilter()
    • testCreateCondition_NumberFilter

      @Test public void testCreateCondition_NumberFilter()
    • testCreateCondition_DateFilter

      @Test public void testCreateCondition_DateFilter()
    • testCreateCondition_ContainsFilter

      @Test public void testCreateCondition_ContainsFilter()
    • testCreateCondition_InvalidFilterType

      @Test public void testCreateCondition_InvalidFilterType()
    • testCreateCondition_NullFilterModel

      @Test public void testCreateCondition_NullFilterModel()
    • testComputeAllMetrics_Success

      @Test public void testComputeAllMetrics_Success() throws Exception
      Throws:
      Exception
    • testComputeAllMetrics_NoRecordsFound

      @Test public void testComputeAllMetrics_NoRecordsFound() throws Exception
      Throws:
      Exception
    • testComputeAllMetrics_InvalidDatabaseAlias

      @Test public void testComputeAllMetrics_InvalidDatabaseAlias()
    • testComputeAllMetrics_DataAccessException_MaxRetriesExceeded

      @Test public void testComputeAllMetrics_DataAccessException_MaxRetriesExceeded() throws Exception
      Throws:
      Exception
    • testGetDailyGlucoseProfile_Success

      @Test public void testGetDailyGlucoseProfile_Success()
    • testGetDailyGlucoseProfile_NoData

      @Test public void testGetDailyGlucoseProfile_NoData()
    • testGetDailyGlucoseProfile_InvalidStudyId

      @Test public void testGetDailyGlucoseProfile_InvalidStudyId()
    • testGetAmbulatoryGlucoseProfile_DatabaseNotAttached

      @Test public void testGetAmbulatoryGlucoseProfile_DatabaseNotAttached()
    • testGetAmbulatoryGlucoseProfile_DataAccessExceptions

      @Test public void testGetAmbulatoryGlucoseProfile_DataAccessExceptions()
    • testCalculateTimeInRange_succcess

      @Test public void testCalculateTimeInRange_succcess() throws Exception
      Throws:
      Exception
    • testCalculateTimeInRange_databaseNotAttached

      @Test public void testCalculateTimeInRange_databaseNotAttached()
    • testCalculateTimeInRange_noDataFound

      @Test public void testCalculateTimeInRange_noDataFound() throws Exception
      Throws:
      Exception
    • testCalculateTimeInRange_queryFailureWithRetries

      @Test public void testCalculateTimeInRange_queryFailureWithRetries() throws Exception
      Throws:
      Exception
    • testCalculateTimeBelowRangeVeryLow_Success

      @Test public void testCalculateTimeBelowRangeVeryLow_Success() throws Exception
      Throws:
      Exception
    • testCalculateTimeBelowRangeVeryLow_NoData

      @Test public void testCalculateTimeBelowRangeVeryLow_NoData() throws Exception
      Throws:
      Exception
    • testCalculateTimeBelowRangeVeryLow_MaxRetriesExceeded

      @Test public void testCalculateTimeBelowRangeVeryLow_MaxRetriesExceeded() throws Exception
      Throws:
      Exception
    • testGetStudyTotalCgmFiles

      @Test public void testGetStudyTotalCgmFiles() throws Exception
      Throws:
      Exception
    • testGetIndividualStudyDetails

      @Test public void testGetIndividualStudyDetails() throws Exception
      Throws:
      Exception