@@ -40,34 +40,34 @@ describe('Scorer', () => {
40
40
const medicalExam = { isSmoker : false } ;
41
41
const scoringGuide = { stateWithLowCertification : ( ) => false } ;
42
42
43
- const scorer = new Scorer ( candidate ) ;
44
- expect ( scorer . execute ( medicalExam , scoringGuide ) ) . toBe ( 0 ) ;
43
+ const scorer = new Scorer ( candidate , medicalExam ) ;
44
+ expect ( scorer . execute ( scoringGuide ) ) . toBe ( 0 ) ;
45
45
} ) ;
46
46
47
47
it ( 'should return -5 if candidate is not a smoker and has a low certification grade' , ( ) => {
48
48
const candidate = { originState : 'FL' } ;
49
49
const medicalExam = { isSmoker : false } ;
50
50
const scoringGuide = { stateWithLowCertification : ( ) => true } ;
51
51
52
- const scorer = new Scorer ( candidate ) ;
53
- expect ( scorer . execute ( medicalExam , scoringGuide ) ) . toBe ( - 5 ) ;
52
+ const scorer = new Scorer ( candidate , medicalExam ) ;
53
+ expect ( scorer . execute ( scoringGuide ) ) . toBe ( - 5 ) ;
54
54
} ) ;
55
55
56
56
it ( 'should return -5 if candidate is a smoker and has a regular certification grade' , ( ) => {
57
57
const candidate = { originState : 'FL' } ;
58
58
const medicalExam = { isSmoker : true } ;
59
59
const scoringGuide = { stateWithLowCertification : ( ) => false } ;
60
60
61
- const scorer = new Scorer ( candidate ) ;
62
- expect ( scorer . execute ( medicalExam , scoringGuide ) ) . toBe ( - 5 ) ;
61
+ const scorer = new Scorer ( candidate , medicalExam ) ;
62
+ expect ( scorer . execute ( scoringGuide ) ) . toBe ( - 5 ) ;
63
63
} ) ;
64
64
65
65
it ( 'should return -10 if candidate is a smoker and has a low certification grade' , ( ) => {
66
66
const candidate = { originState : 'FL' } ;
67
67
const medicalExam = { isSmoker : true } ;
68
68
const scoringGuide = { stateWithLowCertification : ( ) => true } ;
69
69
70
- const scorer = new Scorer ( candidate ) ;
71
- expect ( scorer . execute ( medicalExam , scoringGuide ) ) . toBe ( - 10 ) ;
70
+ const scorer = new Scorer ( candidate , medicalExam ) ;
71
+ expect ( scorer . execute ( scoringGuide ) ) . toBe ( - 10 ) ;
72
72
} ) ;
73
73
} ) ;
0 commit comments