Skip to content

Commit 28c31f8

Browse files
NikoBergemannbastihavDavid Buderusmatthias-geuchenanemonekk
committed
update tests for new timestamp handling
Co-authored-by: Bastian Haverkamp <bastihav@mail.upb.de> Co-authored-by: David Buderus <dbuderus@mail.uni-paderborn.de> Co-authored-by: Matthias Geuchen <mgeuchen@mail.uni-paderborn.de> Co-authored-by: Anemone Kampkötter <anemone@kampkoetter.de>
1 parent 6fdddb1 commit 28c31f8

1 file changed

Lines changed: 3 additions & 129 deletions

File tree

UC4-chaincode/src/test/resources/test_configs/admission_contract/AddAdmissionTestIO.json

Lines changed: 3 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"enrollmentId": "0000001",
5555
"courseId": "C.1",
5656
"moduleId": "M.1",
57-
"timestamp": "2020-12-31T23:59:59",
57+
"timestamp": "",
5858
"type": "Course"
5959
}
6060
],
@@ -64,7 +64,7 @@
6464
"moduleId": "M.1",
6565
"admissionId": "0000001:C.1",
6666
"enrollmentId": "0000001",
67-
"timestamp": "2020-12-31T23:59:59",
67+
"timestamp": "1970-01-01T00:00:00",
6868
"type": "Course"
6969
}
7070
]
@@ -101,7 +101,7 @@
101101
"examId": "ExampleCourse:M.1:WrittenExam:2021-02-16T10:00:00",
102102
"admissionId": "0000001:ExampleCourse:M.1:WrittenExam:2021-02-16T10:00:00",
103103
"enrollmentId": "0000001",
104-
"timestamp": "2020-12-31T23:59:59",
104+
"timestamp": "1970-01-01T00:00:00",
105105
"type": "Exam"
106106
}
107107
]
@@ -397,132 +397,6 @@
397397
}
398398
]
399399
},
400-
{
401-
"name": "addNonExistingAdmission_EmptyParam_Timestamp",
402-
"type": "addAdmission_FAILURE",
403-
"ids": [
404-
"User1",
405-
"0000005"
406-
],
407-
"setup": {
408-
"examinationRegulationContract": [
409-
"Computer Science",
410-
{
411-
"name": "Computer Science",
412-
"active": true,
413-
"modules": [
414-
{
415-
"id": "M.1",
416-
"name": "Math 1"
417-
},
418-
{
419-
"id": "M.2",
420-
"name": "Math 2"
421-
}
422-
]
423-
}
424-
],
425-
"matriculationDataContract": [
426-
"0000005",
427-
{
428-
"enrollmentId": "0000005",
429-
"matriculationStatus": [
430-
{
431-
"fieldOfStudy": "Computer Science",
432-
"semesters": [
433-
"WS2018/19"
434-
]
435-
}
436-
]
437-
}
438-
]
439-
},
440-
"input": [
441-
{
442-
"admissionId": "",
443-
"enrollmentId": "0000005",
444-
"courseId": "C.1",
445-
"moduleId": "M.1",
446-
"timestamp": "",
447-
"type": "Course"
448-
}
449-
],
450-
"compare": [
451-
{
452-
"type": "HLUnprocessableEntity",
453-
"title": "The following parameters do not conform to the specified format",
454-
"invalidParams": [
455-
{
456-
"name": "admission.timestamp",
457-
"reason": "timestamp must be the following format \"(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\", e.g. \"2020-12-31T23:59:59\""
458-
}
459-
]
460-
}
461-
]
462-
},
463-
{
464-
"name": "addNonExistingAdmission_WrongFormatParam_Timestamp",
465-
"type": "addAdmission_FAILURE",
466-
"ids": [
467-
"User1",
468-
"0000006"
469-
],
470-
"setup": {
471-
"examinationRegulationContract": [
472-
"Computer Science",
473-
{
474-
"name": "Computer Science",
475-
"active": true,
476-
"modules": [
477-
{
478-
"id": "M.1",
479-
"name": "Math 1"
480-
},
481-
{
482-
"id": "M.2",
483-
"name": "Math 2"
484-
}
485-
]
486-
}
487-
],
488-
"matriculationDataContract": [
489-
"0000006",
490-
{
491-
"enrollmentId": "0000006",
492-
"matriculationStatus": [
493-
{
494-
"fieldOfStudy": "Computer Science",
495-
"semesters": [
496-
"WS2018/19"
497-
]
498-
}
499-
]
500-
}
501-
]
502-
},
503-
"input": [
504-
{
505-
"admissionId": "",
506-
"enrollmentId": "0000006",
507-
"courseId": "C.1",
508-
"moduleId": "M.1",
509-
"timestamp": "2020-12-31-23:59:59",
510-
"type": "Course"
511-
}
512-
],
513-
"compare": [
514-
{
515-
"type": "HLUnprocessableEntity",
516-
"title": "The following parameters do not conform to the specified format",
517-
"invalidParams": [
518-
{
519-
"name": "admission.timestamp",
520-
"reason": "timestamp must be the following format \"(\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\", e.g. \"2020-12-31T23:59:59\""
521-
}
522-
]
523-
}
524-
]
525-
},
526400
{
527401
"name": "addNonExistingAdmission_InvalidModules",
528402
"type": "addAdmission_FAILURE",

0 commit comments

Comments
 (0)