@studyportals/sp-lurch-interface 2.14.0 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (157) hide show
  1. package/{index.ts → index.d.ts} +2 -24
  2. package/index.js +34 -0
  3. package/index.js.map +1 -0
  4. package/package.json +3 -3
  5. package/src/entities/organisation/i-organisation.interface.d.ts +5 -0
  6. package/src/entities/organisation/i-organisation.interface.js +3 -0
  7. package/src/entities/organisation/i-organisation.interface.js.map +1 -0
  8. package/src/entities/organisation/main-organisations-dto.d.ts +6 -0
  9. package/src/entities/organisation/main-organisations-dto.js +11 -0
  10. package/src/entities/organisation/main-organisations-dto.js.map +1 -0
  11. package/src/entities/organisation/organisation-dto.class.d.ts +7 -0
  12. package/src/entities/organisation/organisation-dto.class.js +12 -0
  13. package/src/entities/organisation/organisation-dto.class.js.map +1 -0
  14. package/src/entities/organisation/organisations-dto.d.ts +6 -0
  15. package/src/entities/organisation/organisations-dto.js +11 -0
  16. package/src/entities/organisation/organisations-dto.js.map +1 -0
  17. package/src/input-batches/input-batch-dto.class.d.ts +15 -0
  18. package/src/input-batches/input-batch-dto.class.js +20 -0
  19. package/src/input-batches/input-batch-dto.class.js.map +1 -0
  20. package/src/input-batches/input-batch-status.d.ts +5 -0
  21. package/src/input-batches/input-batch-status.js +10 -0
  22. package/src/input-batches/input-batch-status.js.map +1 -0
  23. package/src/input-batches/interfaces/i-input-batch.interface.d.ts +13 -0
  24. package/src/input-batches/interfaces/i-input-batch.interface.js +3 -0
  25. package/src/input-batches/interfaces/i-input-batch.interface.js.map +1 -0
  26. package/src/intakes/intake-dto.class.d.ts +14 -0
  27. package/src/intakes/intake-dto.class.js +18 -0
  28. package/src/intakes/intake-dto.class.js.map +1 -0
  29. package/src/intakes/intake-stage-type.d.ts +6 -0
  30. package/src/intakes/intake-stage-type.js +11 -0
  31. package/src/intakes/intake-stage-type.js.map +1 -0
  32. package/src/intakes/interfaces/i-intake.interface.d.ts +12 -0
  33. package/src/intakes/interfaces/i-intake.interface.js +3 -0
  34. package/src/intakes/interfaces/i-intake.interface.js.map +1 -0
  35. package/src/intakes/interfaces/i-match.interface.d.ts +4 -0
  36. package/src/intakes/interfaces/i-match.interface.js +3 -0
  37. package/src/intakes/interfaces/i-match.interface.js.map +1 -0
  38. package/src/intakes/match-dto.class.d.ts +6 -0
  39. package/src/intakes/match-dto.class.js +11 -0
  40. package/src/intakes/match-dto.class.js.map +1 -0
  41. package/src/lurch-client.d.ts +19 -0
  42. package/src/lurch-client.js +77 -0
  43. package/src/lurch-client.js.map +1 -0
  44. package/src/results/discard-input-batch-result.class.d.ts +6 -0
  45. package/src/results/discard-input-batch-result.class.js +17 -0
  46. package/src/results/discard-input-batch-result.class.js.map +1 -0
  47. package/src/results/microsite-student-profile-result.class.d.ts +8 -0
  48. package/src/results/microsite-student-profile-result.class.js +19 -0
  49. package/src/results/microsite-student-profile-result.class.js.map +1 -0
  50. package/src/results/retrieve-input-batch-result.class.d.ts +8 -0
  51. package/src/results/retrieve-input-batch-result.class.js +19 -0
  52. package/src/results/retrieve-input-batch-result.class.js.map +1 -0
  53. package/src/results/retrieve-input-batches-result.class.d.ts +8 -0
  54. package/src/results/retrieve-input-batches-result.class.js +19 -0
  55. package/src/results/retrieve-input-batches-result.class.js.map +1 -0
  56. package/src/results/retrieve-intake-result.class.d.ts +8 -0
  57. package/src/results/retrieve-intake-result.class.js +19 -0
  58. package/src/results/retrieve-intake-result.class.js.map +1 -0
  59. package/src/results/retrieve-intakes-result.class.d.ts +8 -0
  60. package/src/results/retrieve-intakes-result.class.js +19 -0
  61. package/src/results/retrieve-intakes-result.class.js.map +1 -0
  62. package/src/results/retrieve-main-organisations-result.class.d.ts +9 -0
  63. package/src/results/retrieve-main-organisations-result.class.js +21 -0
  64. package/src/results/retrieve-main-organisations-result.class.js.map +1 -0
  65. package/src/results/retrieve-organisations-result.class.d.ts +9 -0
  66. package/src/results/retrieve-organisations-result.class.js +21 -0
  67. package/src/results/retrieve-organisations-result.class.js.map +1 -0
  68. package/src/results/submit-matches-result.class.d.ts +6 -0
  69. package/src/results/submit-matches-result.class.js +17 -0
  70. package/src/results/submit-matches-result.class.js.map +1 -0
  71. package/src/student-profile/interfaces/I-microsite-student-profile.interface.d.ts +9 -0
  72. package/src/student-profile/interfaces/I-microsite-student-profile.interface.js +3 -0
  73. package/src/student-profile/interfaces/I-microsite-student-profile.interface.js.map +1 -0
  74. package/src/student-profile/interfaces/I-student-profile.interface.d.ts +9 -0
  75. package/src/student-profile/interfaces/I-student-profile.interface.js +3 -0
  76. package/src/student-profile/interfaces/I-student-profile.interface.js.map +1 -0
  77. package/tests-u/entities/organisations/organisation-dto.test.d.ts +1 -0
  78. package/tests-u/entities/organisations/organisation-dto.test.js +62 -0
  79. package/tests-u/entities/organisations/organisation-dto.test.js.map +1 -0
  80. package/tests-u/input-batches/input-batch-dto.test.d.ts +1 -0
  81. package/tests-u/input-batches/input-batch-dto.test.js +150 -0
  82. package/tests-u/input-batches/input-batch-dto.test.js.map +1 -0
  83. package/tests-u/input-batches/input-batch-status.test.d.ts +1 -0
  84. package/tests-u/input-batches/input-batch-status.test.js +47 -0
  85. package/tests-u/input-batches/input-batch-status.test.js.map +1 -0
  86. package/tests-u/intakes/intake-dto.test.d.ts +1 -0
  87. package/tests-u/intakes/intake-dto.test.js +128 -0
  88. package/tests-u/intakes/intake-dto.test.js.map +1 -0
  89. package/tests-u/intakes/intake-stage-type.test.d.ts +1 -0
  90. package/tests-u/intakes/intake-stage-type.test.js +56 -0
  91. package/tests-u/intakes/intake-stage-type.test.js.map +1 -0
  92. package/tests-u/intakes/match-dto.test.d.ts +1 -0
  93. package/tests-u/intakes/match-dto.test.js +51 -0
  94. package/tests-u/intakes/match-dto.test.js.map +1 -0
  95. package/tests-u/lurch-client.test.d.ts +1 -0
  96. package/tests-u/lurch-client.test.js +303 -0
  97. package/tests-u/lurch-client.test.js.map +1 -0
  98. package/tests-u/results/discard-input-batch-result.test.d.ts +1 -0
  99. package/tests-u/results/discard-input-batch-result.test.js +40 -0
  100. package/tests-u/results/discard-input-batch-result.test.js.map +1 -0
  101. package/tests-u/results/retrieve-input-batch-result.test.d.ts +1 -0
  102. package/tests-u/results/retrieve-input-batch-result.test.js +51 -0
  103. package/tests-u/results/retrieve-input-batch-result.test.js.map +1 -0
  104. package/tests-u/results/retrieve-input-batches-result.test.d.ts +1 -0
  105. package/tests-u/results/retrieve-input-batches-result.test.js +51 -0
  106. package/tests-u/results/retrieve-input-batches-result.test.js.map +1 -0
  107. package/tests-u/results/retrieve-intake-result.test.d.ts +1 -0
  108. package/tests-u/results/retrieve-intake-result.test.js +51 -0
  109. package/tests-u/results/retrieve-intake-result.test.js.map +1 -0
  110. package/tests-u/results/retrieve-intakes-result.test.d.ts +1 -0
  111. package/tests-u/results/retrieve-intakes-result.test.js +51 -0
  112. package/tests-u/results/retrieve-intakes-result.test.js.map +1 -0
  113. package/tests-u/results/retrieve-main-organisation-result.test.d.ts +1 -0
  114. package/tests-u/results/retrieve-main-organisation-result.test.js +53 -0
  115. package/tests-u/results/retrieve-main-organisation-result.test.js.map +1 -0
  116. package/tests-u/results/retrieve-organisation-result.test.d.ts +1 -0
  117. package/tests-u/results/retrieve-organisation-result.test.js +53 -0
  118. package/tests-u/results/retrieve-organisation-result.test.js.map +1 -0
  119. package/tests-u/results/submit-matches-result.test.d.ts +1 -0
  120. package/tests-u/results/submit-matches-result.test.js +31 -0
  121. package/tests-u/results/submit-matches-result.test.js.map +1 -0
  122. package/src/entities/organisation/i-organisation.interface.ts +0 -5
  123. package/src/entities/organisation/organisation-dto.class.ts +0 -11
  124. package/src/entities/organisation/organisations-dto.ts +0 -9
  125. package/src/input-batches/input-batch-dto.class.ts +0 -19
  126. package/src/input-batches/input-batch-status.ts +0 -5
  127. package/src/input-batches/interfaces/i-input-batch.interface.ts +0 -13
  128. package/src/intakes/intake-dto.class.ts +0 -18
  129. package/src/intakes/intake-stage-type.ts +0 -6
  130. package/src/intakes/interfaces/i-intake.interface.ts +0 -14
  131. package/src/intakes/interfaces/i-match.interface.ts +0 -4
  132. package/src/intakes/match-dto.class.ts +0 -10
  133. package/src/lurch-client.ts +0 -85
  134. package/src/results/discard-input-batch-result.class.ts +0 -21
  135. package/src/results/microsite-student-profile-result.class.ts +0 -25
  136. package/src/results/retrieve-input-batch-result.class.ts +0 -25
  137. package/src/results/retrieve-input-batches-result.class.ts +0 -25
  138. package/src/results/retrieve-intake-result.class.ts +0 -25
  139. package/src/results/retrieve-intakes-result.class.ts +0 -25
  140. package/src/results/retrieve-organisations-result.class.ts +0 -26
  141. package/src/results/submit-matches-result.class.ts +0 -18
  142. package/src/student-profile/interfaces/I-microsite-student-profile.interface.ts +0 -10
  143. package/tests-u/entities/organisations/organisation-dto.test.ts +0 -37
  144. package/tests-u/input-batches/input-batch-dto.test.ts +0 -102
  145. package/tests-u/input-batches/input-batch-status.test.ts +0 -21
  146. package/tests-u/intakes/intake-dto.test.ts +0 -86
  147. package/tests-u/intakes/intake-stage-type.test.ts +0 -26
  148. package/tests-u/intakes/match-dto.test.ts +0 -30
  149. package/tests-u/lurch-client.test.ts +0 -257
  150. package/tests-u/results/discard-input-batch-result.test.ts +0 -22
  151. package/tests-u/results/retrieve-input-batch-result.test.ts +0 -31
  152. package/tests-u/results/retrieve-input-batches-result.test.ts +0 -30
  153. package/tests-u/results/retrieve-intake-result.test.ts +0 -30
  154. package/tests-u/results/retrieve-intakes-result.test.ts +0 -30
  155. package/tests-u/results/retrieve-organisation-result.test.ts +0 -32
  156. package/tests-u/results/submit-matches-result.test.ts +0 -16
  157. package/tsconfig.json +0 -38
@@ -1,25 +0,0 @@
1
- import { SuccessResult } from "@studyportals/sp-r2d2-interface";
2
-
3
- import { IMicrositeStudentProfile } from "../student-profile/interfaces/I-microsite-student-profile.interface";
4
-
5
-
6
- export class MicrositeStudentProfileResult extends SuccessResult {
7
- public readonly __microsite_student_profile_result__: true = true;
8
-
9
-
10
- public constructor(
11
- public readonly studentProfile: IMicrositeStudentProfile
12
- ) {
13
- super();
14
- }
15
-
16
-
17
- protected toJSON(): object {
18
- const obj: any = super.toJSON();
19
-
20
- obj["__retrieve_input_batch_result__"] = this.__microsite_student_profile_result__;
21
- obj["studentProfile"] = this.studentProfile;
22
-
23
- return obj;
24
- }
25
- }
@@ -1,25 +0,0 @@
1
- import { SuccessResult } from "@studyportals/sp-r2d2-interface";
2
-
3
- import { IInputBatch } from "../input-batches/interfaces/i-input-batch.interface";
4
-
5
-
6
- export class RetrieveInputBatchResult extends SuccessResult {
7
- public readonly __retrieve_input_batch_result__: true = true;
8
-
9
-
10
- public constructor(
11
- public readonly inputBatch: IInputBatch
12
- ) {
13
- super();
14
- }
15
-
16
-
17
- protected toJSON(): object {
18
- const obj: any = super.toJSON();
19
-
20
- obj["__retrieve_input_batch_result__"] = this.__retrieve_input_batch_result__;
21
- obj["inputBatch"] = this.inputBatch;
22
-
23
- return obj;
24
- }
25
- }
@@ -1,25 +0,0 @@
1
- import { SuccessResult } from "@studyportals/sp-r2d2-interface";
2
-
3
- import { IInputBatch } from "../input-batches/interfaces/i-input-batch.interface";
4
-
5
-
6
- export class RetrieveInputBatchesResult extends SuccessResult {
7
- public readonly __retrieve_input_batches_result__: true = true;
8
-
9
-
10
- public constructor(
11
- public readonly inputBatches: IInputBatch[]
12
- ) {
13
- super();
14
- }
15
-
16
-
17
- protected toJSON(): object {
18
- const obj: any = super.toJSON();
19
-
20
- obj["__retrieve_input_batches_result__"] = this.__retrieve_input_batches_result__;
21
- obj["inputBatches"] = this.inputBatches;
22
-
23
- return obj;
24
- }
25
- }
@@ -1,25 +0,0 @@
1
- import { SuccessResult } from "@studyportals/sp-r2d2-interface";
2
-
3
- import { IIntake } from "../intakes/interfaces/i-intake.interface";
4
-
5
-
6
- export class RetrieveIntakeResult extends SuccessResult {
7
- public readonly __retrieve_intake_result__: true = true;
8
-
9
-
10
- public constructor(
11
- public readonly intake: IIntake
12
- ) {
13
- super();
14
- }
15
-
16
-
17
- protected toJSON(): object {
18
- const obj: any = super.toJSON();
19
-
20
- obj["__retrieve_intake_result__"] = this.__retrieve_intake_result__;
21
- obj["intake"] = this.intake;
22
-
23
- return obj;
24
- }
25
- }
@@ -1,25 +0,0 @@
1
- import { SuccessResult } from "@studyportals/sp-r2d2-interface";
2
-
3
- import { IIntake } from "../intakes/interfaces/i-intake.interface";
4
-
5
-
6
- export class RetrieveIntakesResult extends SuccessResult {
7
- public readonly __retrieve_intakes_result__: true = true;
8
-
9
-
10
- public constructor(
11
- public readonly intakes: IIntake[]
12
- ) {
13
- super();
14
- }
15
-
16
-
17
- protected toJSON(): object {
18
- const obj: any = super.toJSON();
19
-
20
- obj["__retrieve_intakes_result__"] = this.__retrieve_intakes_result__;
21
- obj["intakes"] = this.intakes;
22
-
23
- return obj;
24
- }
25
- }
@@ -1,26 +0,0 @@
1
- import { SuccessResult } from "@studyportals/sp-r2d2-interface";
2
- import { IOrganisation } from "../entities/organisation/i-organisation.interface";
3
-
4
-
5
- export class RetrieveOrganisationsResult extends SuccessResult {
6
- public readonly __retrieve_organisation_result__: true = true;
7
-
8
-
9
- public constructor(
10
- public readonly organisations: IOrganisation[],
11
- public readonly userId: number
12
- ) {
13
- super();
14
- }
15
-
16
-
17
- protected toJSON(): object {
18
- const obj: any = super.toJSON();
19
-
20
- obj["__retrieve_organisation_result__"] = this.__retrieve_organisation_result__;
21
- obj["organisations"] = this.organisations;
22
- obj["userId"] = this.userId;
23
-
24
- return obj;
25
- }
26
- }
@@ -1,18 +0,0 @@
1
- import { SuccessResult } from "@studyportals/sp-r2d2-interface";
2
-
3
-
4
- export class SubmitMatchesResult extends SuccessResult {
5
- public constructor(
6
- public readonly confirmedMatchesCount: number
7
- ) {
8
- super();
9
- }
10
-
11
- protected toJSON(): object {
12
- const obj: any = super.toJSON();
13
-
14
- obj["confirmedMatchesCount"] = this.confirmedMatchesCount;
15
-
16
- return obj;
17
- }
18
- }
@@ -1,10 +0,0 @@
1
- export interface IMicrositeStudentProfile {
2
- readonly identity: string;
3
- readonly email: string;
4
- readonly dateCreated: string;
5
- readonly firstName: string;
6
- readonly lastName: string;
7
- readonly nationality: string;
8
- readonly organisationId: string;
9
- }
10
-
@@ -1,37 +0,0 @@
1
- import { assert } from "chai";
2
- import { suite, test } from "mocha-typescript";
3
- import { OrganisationDto } from "../../../src/entities/organisation/organisation-dto.class";
4
-
5
-
6
- @suite
7
- class OrganisationDtoTest {
8
- @test
9
- public constructor__TypeGuardSet() {
10
- const testInstance = new OrganisationDto("", "");
11
-
12
- assert.isTrue(testInstance.__i_organisation__);
13
- }
14
-
15
- @test
16
- public serialization__TypeGuardSerialized() {
17
- const deserialized = JSON.parse(JSON.stringify(new OrganisationDto("", "")));
18
-
19
- assert.isTrue(deserialized.__i_organisation__);
20
- }
21
-
22
- @test
23
- public serialization__IdentitySerialized() {
24
- const value = "SomeValue";
25
- const deserialized = JSON.parse(JSON.stringify(new OrganisationDto(value, "")));
26
-
27
- assert.equal(deserialized.identity, value);
28
- }
29
-
30
- @test
31
- public serialization__NameSerialized() {
32
- const value = "SomeValue";
33
- const deserialized = JSON.parse(JSON.stringify(new OrganisationDto("", value)));
34
-
35
- assert.equal(deserialized.name, value);
36
- }
37
- }
@@ -1,102 +0,0 @@
1
- import { assert } from "chai";
2
- import { suite, test } from "mocha-typescript";
3
-
4
- import { InputBatchDto } from "../../src/input-batches/input-batch-dto.class";
5
-
6
-
7
- @suite
8
- class InputBatchDtoTest {
9
- @test
10
- public constructor__TypeGuardSet() {
11
- const testInstance = new InputBatchDto("", "", 0, "", 0, 0, 0, 0, 0, "");
12
-
13
- assert.isTrue(testInstance.__i_input_batch__);
14
- }
15
-
16
- @test
17
- public serialization__TypeGuardSerialized() {
18
- const deserialized = JSON.parse(JSON.stringify(new InputBatchDto("", "", 0, "", 0, 0, 0, 0, 0, "")));
19
-
20
- assert.isTrue(deserialized.__i_input_batch__);
21
- }
22
-
23
- @test
24
- public serialization__IdentitySerialized() {
25
- const value = "SomeValue";
26
- const deserialized = JSON.parse(JSON.stringify(new InputBatchDto(value, "", 0, "", 0, 0, 0, 0, 0, "")));
27
-
28
- assert.equal(deserialized.identity, value);
29
- }
30
-
31
- @test
32
- public serialization__CreationTimeSerialized() {
33
- const value = "SomeValue";
34
- const deserialized = JSON.parse(JSON.stringify(new InputBatchDto("", value, 0, "", 0, 0, 0, 0, 0, "")));
35
-
36
- assert.equal(deserialized.creationTimeIso, value);
37
- }
38
-
39
- @test
40
- public serialization__StatusSerialized() {
41
- const value = 0;
42
- const deserialized = JSON.parse(JSON.stringify(new InputBatchDto("", "", value, "", 0, 0, 0, 0, 0, "")));
43
-
44
- assert.equal(deserialized.status, value);
45
- }
46
-
47
- @test
48
- public serialization__OrganisationIdSerialized() {
49
- const value = "SomeValue";
50
- const deserialized = JSON.parse(JSON.stringify(new InputBatchDto("", "", 0, value, 0, 0, 0, 0, 0, "")));
51
-
52
- assert.equal(deserialized.organisationIdentity, value);
53
- }
54
-
55
- @test
56
- public serialization__IntakeMonthSerialized() {
57
- const value = 1;
58
- const deserialized = JSON.parse(JSON.stringify(new InputBatchDto("", "", 0, "", value, 0, 0, 0, 0, "")));
59
-
60
- assert.equal(deserialized.intakeMonth, value);
61
- }
62
-
63
- @test
64
- public serialization__IntakeYearSerialized() {
65
- const value = 1;
66
- const deserialized = JSON.parse(JSON.stringify(new InputBatchDto("", "", 0, "", 0, value, 0, 0, 0, "")));
67
-
68
- assert.equal(deserialized.intakeYear, value);
69
- }
70
-
71
- @test
72
- public serialization__TargetIntakeStageTypeSerialized() {
73
- const value = "SomeValue" as any;
74
- const deserialized = JSON.parse(JSON.stringify(new InputBatchDto("", "", 0, "", 0, 0, value, 0, 0, "")));
75
-
76
- assert.equal(deserialized.targetIntakeStageType, value);
77
- }
78
-
79
- @test
80
- public serialization__InputSizeSerialized() {
81
- const value = "SomeValue" as any;
82
- const deserialized = JSON.parse(JSON.stringify(new InputBatchDto("", "", 0, "", 0, 0, 0, value, 0, "")));
83
-
84
- assert.equal(deserialized.inputSize, value);
85
- }
86
-
87
- @test
88
- public serialization__MatchesCountSerialized() {
89
- const value = "SomeValue" as any;
90
- const deserialized = JSON.parse(JSON.stringify(new InputBatchDto("", "", 0, "", 0, 0, 0, 0, value, "")));
91
-
92
- assert.equal(deserialized.matchesCount, value);
93
- }
94
-
95
- @test
96
- public serialization__RepresentativeIdentitySerialized() {
97
- const value = "SomeValue" as any;
98
- const deserialized = JSON.parse(JSON.stringify(new InputBatchDto("", "", 0, "", 0, 0, 0, 0, 0, value)));
99
-
100
- assert.equal(deserialized.representativeIdentity, value);
101
- }
102
- }
@@ -1,21 +0,0 @@
1
- import { assert } from 'chai';
2
- import { suite, test } from 'mocha-typescript';
3
- import { InputBatchStatus } from '../..';
4
-
5
- @suite
6
- class InputBatchStatusTest {
7
- @test
8
- public submitted_0() {
9
- assert.equal(InputBatchStatus.SUBMITTED, 0);
10
- }
11
-
12
- @test
13
- public approved_1() {
14
- assert.equal(InputBatchStatus.APPROVED, 1);
15
- }
16
-
17
- @test
18
- public discarded_2() {
19
- assert.equal(InputBatchStatus.DISCARDED, 2);
20
- }
21
- }
@@ -1,86 +0,0 @@
1
- import { assert } from "chai";
2
- import { suite, test } from "mocha-typescript";
3
-
4
- import { IntakeDto } from "../../src/intakes/intake-dto.class";
5
-
6
-
7
- @suite
8
- class IntakeDtoTest {
9
- @test
10
- public constructor__TypeGuardSet() {
11
- const testInstance = new IntakeDto("", "", 0, 0, [], [], [], []);
12
-
13
- assert.isTrue(testInstance.__i_intake__);
14
- }
15
-
16
- @test
17
- public serialization__TypeGuardSerialized() {
18
- const deserialized = JSON.parse(JSON.stringify(new IntakeDto("", "", 0, 0, [], [], [], [])));
19
-
20
- assert.isTrue(deserialized.__i_intake__);
21
- }
22
-
23
- @test
24
- public serialization__IdentitySerialized() {
25
- const value = "SomeValue";
26
- const deserialized = JSON.parse(JSON.stringify(new IntakeDto(value, "", 0, 0, [], [], [], [])));
27
-
28
- assert.equal(deserialized.identity, value);
29
- }
30
-
31
- @test
32
- public serialization__OrganisationIdSerialized() {
33
- const value = "SomeValue";
34
- const deserialized = JSON.parse(JSON.stringify(new IntakeDto("", value, 0, 0, [], [], [], [])));
35
-
36
- assert.equal(deserialized.organisationId, value);
37
- }
38
-
39
- @test
40
- public serialization__IntakeMonthSerialized() {
41
- const value = 1;
42
- const deserialized = JSON.parse(JSON.stringify(new IntakeDto("", "", value, 0, [], [], [], [])));
43
-
44
- assert.equal(deserialized.intakeMonth, value);
45
- }
46
-
47
- @test
48
- public serialization__IntakeYearSerialized() {
49
- const value = 1;
50
- const deserialized = JSON.parse(JSON.stringify(new IntakeDto("", "", 0, value, [], [], [], [])));
51
-
52
- assert.equal(deserialized.intakeYear, value);
53
- }
54
-
55
- @test
56
- public serialization__ApplicationsSerialized() {
57
- const value = "SomeValue" as any;
58
- const deserialized = JSON.parse(JSON.stringify(new IntakeDto("", "", 0, 0, value, [], [], [])));
59
-
60
- assert.equal(deserialized.applications, value);
61
- }
62
-
63
- @test
64
- public serialization__AcceptedSerialized() {
65
- const value = "SomeValue" as any;
66
- const deserialized = JSON.parse(JSON.stringify(new IntakeDto("", "", 0, 0, [], value, [], [])));
67
-
68
- assert.equal(deserialized.accepted, value);
69
- }
70
-
71
- @test
72
- public serialization__EnrolmentsSerialized() {
73
- const value = "SomeValue" as any;
74
- const deserialized = JSON.parse(JSON.stringify(new IntakeDto("", "", 0, 0, [], [], value, [])));
75
-
76
- assert.equal(deserialized.enrolments, value);
77
- }
78
-
79
- @test
80
- public serialization__LeadsSerialized() {
81
- const value = "SomeValue" as any;
82
- const deserialized = JSON.parse(JSON.stringify(new IntakeDto("", "", 0, 0, [], [], [], value)));
83
-
84
- assert.equal(deserialized.leads, value);
85
- }
86
- }
@@ -1,26 +0,0 @@
1
- import { assert } from 'chai';
2
- import { suite, test } from 'mocha-typescript';
3
- import { IntakeStageType } from '../../src/intakes/intake-stage-type';
4
-
5
- @suite
6
- class IntakeStageTypeTest {
7
- @test
8
- public application_0() {
9
- assert.equal(IntakeStageType.APPLICATION, 0);
10
- }
11
-
12
- @test
13
- public accepted_1() {
14
- assert.equal(IntakeStageType.ACCEPTED, 1);
15
- }
16
-
17
- @test
18
- public enrolment_2() {
19
- assert.equal(IntakeStageType.ENROLMENT, 2);
20
- }
21
-
22
- @test
23
- public lead_3() {
24
- assert.equal(IntakeStageType.LEAD, 3);
25
- }
26
- }
@@ -1,30 +0,0 @@
1
- import { assert } from "chai";
2
- import { suite, test } from "mocha-typescript";
3
-
4
- import { MatchDto } from "../../src/intakes/match-dto.class";
5
-
6
-
7
- @suite
8
- class MatchDtoTest {
9
- @test
10
- public constructor__TypeGuardSet() {
11
- const testInstance = new MatchDto("");
12
-
13
- assert.isTrue(testInstance.__i_match__);
14
- }
15
-
16
- @test
17
- public serialization__TypeGuardSerialized() {
18
- const deserialization = JSON.parse(JSON.stringify(new MatchDto("")));
19
-
20
- assert.isTrue(deserialization.__i_match__);
21
- }
22
-
23
- @test
24
- public serialization__StudentIdSerialized() {
25
- const value = "SomeValue";
26
- const deserialization = JSON.parse(JSON.stringify(new MatchDto(value)));
27
-
28
- assert.equal(deserialization.studentId, value);
29
- }
30
- }