Skip to content

Phase 3 assessments capture with Unit test

closes #53 (closed)

Phase 3 Assessments Capture with Unit tests

Tasks Done

  • Create model class for stage-3 normal, problem, danger
  • create methods to validate all stage-3 assessments
  • create methods to push data to dhis2
  • capture assessments
  • show assessments based on classification
  • unit test phase 3
Danger Problem Normal
Screenshot_1626692227 Screenshot_1626692292 Screenshot_1626694761
Phase 3 Assessments Unit testing

Test Cases

  • Throws exception if Stage3 Normal assessments are incomplete
  • Throws exception if Stage3 Problem assessments are incomplete
  • Throws exception if Stage3 Danger assessments are incomplete
  • Marks Stage3 Normal as complete if everything is correctly filled
  • Marks Stage3 Problem as complete if everything is correctly filled
  • Marks Stage3 Danger as complete if everything is correctly filled
  • Adds Stage3 Normal assessments if list size is 2 and classification is normal
  • Adds Stage3 Problem assessments if list size is 2 and classification is problem
  • Adds Stage3 Danger assessments if list size is 2 and classification is danger
Bloc Test
  • yields AssessmentsAdded on successful adding of phase 3
  • yields AssessmentsError when assessments are incomplete while adding of phase 3 assessments
Edited by Darshpreet Singh

Merge request reports