From 3a15b6cf5bf7f8ba955b6723a5854cb254501c84 Mon Sep 17 00:00:00 2001 From: Karl-Philipp Wulfert Date: Tue, 8 Jan 2019 14:46:49 +0100 Subject: [PATCH] test: adjust tests --- test/General.spec.ts | 22 ++++++++++++++++++---- test/resources/AcademicEvent.1.json | 7 ++++--- test/resources/AcademicEvent.2.json | 7 ++++--- test/resources/AcademicEvent.3.json | 7 ++++--- test/resources/Article.1.json | 7 ++++--- test/resources/Article.2.json | 7 ++++--- test/resources/Book.1.json | 7 ++++--- test/resources/Book.2.json | 7 ++++--- test/resources/Building.1.json | 7 ++++--- test/resources/Catalog.1.json | 7 ++++--- test/resources/Catalog.2.json | 7 ++++--- test/resources/CourseOfStudies.1.json | 7 ++++--- test/resources/DateSeries.1.json | 7 ++++--- test/resources/DateSeries.2.json | 7 ++++--- test/resources/Diff.1.json | 7 ++++--- test/resources/Diff.2.json | 7 ++++--- test/resources/Dish.1.json | 7 ++++--- test/resources/Dish.2.json | 7 ++++--- test/resources/Dish.3.json | 7 ++++--- test/resources/Favorite.json | 7 ++++--- test/resources/Floor.1.json | 7 ++++--- test/resources/Floor.2.json | 7 ++++--- test/resources/Floor.3.json | 7 ++++--- test/resources/Message.1.json | 7 ++++--- test/resources/Message.2.json | 11 +++++++---- test/resources/Message.3.json | 7 ++++--- test/resources/Organization.json | 7 ++++--- test/resources/Person.1.json | 7 ++++--- test/resources/Person.2.json | 7 ++++--- test/resources/Person.3.json | 7 ++++--- test/resources/PointOfInterest.1.json | 7 ++++--- test/resources/PointOfInterest.2.json | 7 ++++--- test/resources/Room.1.json | 7 ++++--- test/resources/Room.2.json | 7 ++++--- test/resources/Room.3.json | 7 ++++--- test/resources/Room.4.json | 7 ++++--- test/resources/SearchRequest.1.json | 7 ++++--- test/resources/Semester.1.json | 7 ++++--- test/resources/Semester.2.json | 7 ++++--- test/resources/Setting.1.json | 7 ++++--- test/resources/Setting.2.json | 7 ++++--- test/resources/Ticket.json | 7 ++++--- test/resources/Tour.1.json | 7 ++++--- test/resources/Tour.2.json | 7 ++++--- test/resources/Video.1.json | 7 ++++--- test/resources/Video.2.json | 7 ++++--- 46 files changed, 201 insertions(+), 140 deletions(-) diff --git a/test/General.spec.ts b/test/General.spec.ts index 519b2c2a..2fb03daf 100644 --- a/test/General.spec.ts +++ b/test/General.spec.ts @@ -12,11 +12,12 @@ * You should have received a copy of the GNU General Public License along with * this program. If not, see . */ -import {validateFiles} from '@openstapps/core-validator'; +import {validateFiles, writeReport} from '@openstapps/core-tools/lib/validate'; import {Logger} from '@openstapps/logger'; +import {expect} from 'chai'; +import {mkdirSync} from 'fs'; import {slow, suite, test, timeout} from 'mocha-typescript'; -import {join} from 'path'; -import {cwd} from 'process'; +import {join, resolve} from 'path'; const logger = new Logger(); @@ -29,6 +30,19 @@ process.on('unhandledRejection', (err) => { export class ValidateTestFiles { @test async validateTestFiles() { - await validateFiles(join(cwd(), 'lib', 'schema'), join(cwd(), 'test', 'resources'), join(cwd(), 'report')); + const errorsPerFile = await validateFiles(resolve('lib', 'schema'), resolve('test', 'resources')); + + let unexpected = false; + Object.keys(errorsPerFile).forEach((file) => { + unexpected = unexpected || errorsPerFile[file].some((error) => !error.expected); + }); + + expect(unexpected).to.be.equal(false); + + mkdirSync('report', { + recursive: true, + }); + + await writeReport(join('report', 'index.html'), errorsPerFile); } } diff --git a/test/resources/AcademicEvent.1.json b/test/resources/AcademicEvent.1.json index da94cb83..a9fe1674 100644 --- a/test/resources/AcademicEvent.1.json +++ b/test/resources/AcademicEvent.1.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "type": "academic event", "description": "Fortsetzung der Algebra I: Galoistheorie mit Anwendungen, ausgewählte Spezialthemen.", "uid": "540862f3-ea30-5b8f-8678-56b4dc217140", @@ -78,5 +78,6 @@ } } } - } + }, + "schema": "SCAcademicEvent" } diff --git a/test/resources/AcademicEvent.2.json b/test/resources/AcademicEvent.2.json index 11d83d42..ea99fecf 100644 --- a/test/resources/AcademicEvent.2.json +++ b/test/resources/AcademicEvent.2.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "type": "academic event", "description": "Grundlagen, algebraische Grundbegriffe, Vektorräume, lineare Abbildungen und Gleichungen, Determinanten", "uid": "540862f3-ea30-5b8f-8678-56b4dc217140", @@ -67,5 +67,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCAcademicEvent" } diff --git a/test/resources/AcademicEvent.3.json b/test/resources/AcademicEvent.3.json index ae06e192..db35dade 100644 --- a/test/resources/AcademicEvent.3.json +++ b/test/resources/AcademicEvent.3.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "type": "academic event", "description": "Die Übung hat 2 SWS und wird auf 2 Gruppen verteilt.", "uid": "540862f3-ea30-5b8f-8678-56b4dc217140", @@ -94,5 +94,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCAcademicEvent" } diff --git a/test/resources/Article.1.json b/test/resources/Article.1.json index dcf6dda6..141f1ad2 100644 --- a/test/resources/Article.1.json +++ b/test/resources/Article.1.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "uid": "540862f3-ea30-5b8f-8678-56b4dc217140", "type": "article", "categories": [ @@ -26,5 +26,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCArticle" } diff --git a/test/resources/Article.2.json b/test/resources/Article.2.json index 47fea5f5..8ee4157b 100644 --- a/test/resources/Article.2.json +++ b/test/resources/Article.2.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "uid": "540862f3-ea30-5b8f-8678-56b4dc217140", "type": "article", "categories": [ @@ -28,5 +28,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCArticle" } diff --git a/test/resources/Book.1.json b/test/resources/Book.1.json index 1b82c081..971e6fdc 100644 --- a/test/resources/Book.1.json +++ b/test/resources/Book.1.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "type": "book", "uid": "540862f3-ea30-5b8f-8678-56b4dc217140", "name": "Kundenorientierung durch Quality Function Deployment: Systematisches Entwickeln von Produkten und Dienstleistungen", @@ -42,5 +42,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCBook" } diff --git a/test/resources/Book.2.json b/test/resources/Book.2.json index 5837335e..b9b3b203 100644 --- a/test/resources/Book.2.json +++ b/test/resources/Book.2.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "type": "book", "uid": "540862f3-ea30-5b8f-8678-56b4dc217140", "name": "Minimal Book", @@ -23,5 +23,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCBook" } diff --git a/test/resources/Building.1.json b/test/resources/Building.1.json index 3faee691..e56e0b20 100644 --- a/test/resources/Building.1.json +++ b/test/resources/Building.1.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "geo": { "point": { "type": "Point", @@ -165,5 +165,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCBuilding" } diff --git a/test/resources/Catalog.1.json b/test/resources/Catalog.1.json index b076760c..9172b85d 100644 --- a/test/resources/Catalog.1.json +++ b/test/resources/Catalog.1.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "uid": "64bb29ed-21e5-50c7-9d7c-1dc4741001b9", "type": "catalog", "level": 1, @@ -55,5 +55,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCCatalog" } diff --git a/test/resources/Catalog.2.json b/test/resources/Catalog.2.json index 5a0d0d2e..ebbb8538 100644 --- a/test/resources/Catalog.2.json +++ b/test/resources/Catalog.2.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "uid": "5a1f4f51-2498-5af1-91cb-c939673cc69c", "type": "catalog", "level": 3, @@ -82,5 +82,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCCatalog" } diff --git a/test/resources/CourseOfStudies.1.json b/test/resources/CourseOfStudies.1.json index ebfaf665..c9e3148d 100644 --- a/test/resources/CourseOfStudies.1.json +++ b/test/resources/CourseOfStudies.1.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "academicDegree": "bachelor", "academicDegreewithField": "Bachelor of Arts", "academicDegreewithFieldShort": "B.A.", @@ -36,5 +36,6 @@ "timeMode": "parttime", "type": "course of studies", "uid": "540862f3-ea30-5b8f-8678-56b4dc217140" - } + }, + "schema": "SCCourseOfStudies" } diff --git a/test/resources/DateSeries.1.json b/test/resources/DateSeries.1.json index 025f0436..2b0f73c0 100644 --- a/test/resources/DateSeries.1.json +++ b/test/resources/DateSeries.1.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "type": "date series", "uid": "540862f3-ea30-5b8f-8678-56b4dc217140", "name": "Einführung in die Wirtschaftspolitik", @@ -50,5 +50,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCDateSeries" } diff --git a/test/resources/DateSeries.2.json b/test/resources/DateSeries.2.json index de2ca42f..518d8a35 100644 --- a/test/resources/DateSeries.2.json +++ b/test/resources/DateSeries.2.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "type": "date series", "uid": "540862f3-ea30-5b8f-8678-56b4dc217140", "name": "Distributed Algorithms", @@ -47,5 +47,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCDateSeries" } diff --git a/test/resources/Diff.1.json b/test/resources/Diff.1.json index db704a16..22fdc173 100644 --- a/test/resources/Diff.1.json +++ b/test/resources/Diff.1.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "uid": "540862f3-ea30-5b8f-8678-56b4dc217140", "dateCreated": "2017-02-07T09:26:35.957Z", "name": "changed_testuid", @@ -30,5 +30,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCDiff" } diff --git a/test/resources/Diff.2.json b/test/resources/Diff.2.json index bd34d8cb..013b51b0 100644 --- a/test/resources/Diff.2.json +++ b/test/resources/Diff.2.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "uid": "540862f3-ea30-5b8f-8678-56b4dc217140", "dateCreated": "2017-03-07T09:26:35.957Z", "name": "changed_testuid", @@ -30,5 +30,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCDiff" } diff --git a/test/resources/Dish.1.json b/test/resources/Dish.1.json index 099013f5..c6140f5b 100644 --- a/test/resources/Dish.1.json +++ b/test/resources/Dish.1.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "type": "dish", "name": "Pizza mit Geflügelsalami und Champignons", "categories": [ @@ -65,5 +65,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCDish" } diff --git a/test/resources/Dish.2.json b/test/resources/Dish.2.json index f5130e59..3e4e10a9 100644 --- a/test/resources/Dish.2.json +++ b/test/resources/Dish.2.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "type": "dish", "name": "Sahne-Bärlauchsauce", "description": "Nudelauswahl", @@ -64,5 +64,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCDish" } diff --git a/test/resources/Dish.3.json b/test/resources/Dish.3.json index 43f1580d..1bef1259 100644 --- a/test/resources/Dish.3.json +++ b/test/resources/Dish.3.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "additives": [ "1 = mit Farbstoff", "2 = konserviert", @@ -129,5 +129,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCDish" } diff --git a/test/resources/Favorite.json b/test/resources/Favorite.json index cd2c16b4..acb0cf16 100644 --- a/test/resources/Favorite.json +++ b/test/resources/Favorite.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "type": "favorite", "name": "Favorite #1", "uid": "540862f3-ea30-5b8f-8678-56b4dc217140", @@ -29,5 +29,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCFavorite" } diff --git a/test/resources/Floor.1.json b/test/resources/Floor.1.json index 93496da7..d367e822 100644 --- a/test/resources/Floor.1.json +++ b/test/resources/Floor.1.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "uid": "540862f3-ea30-5b8f-8678-56b4dc217140", "name": "MA E:0", "type": "floor", @@ -7061,5 +7061,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCFloor" } diff --git a/test/resources/Floor.2.json b/test/resources/Floor.2.json index 1e2ce520..faa9079f 100644 --- a/test/resources/Floor.2.json +++ b/test/resources/Floor.2.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "uid": "540862f3-ea30-5b8f-8678-56b4dc217140", "name": "H_4", "type": "floor", @@ -17178,5 +17178,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCFloor" } diff --git a/test/resources/Floor.3.json b/test/resources/Floor.3.json index 1bde351c..9da24524 100644 --- a/test/resources/Floor.3.json +++ b/test/resources/Floor.3.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "uid": "540862f3-ea30-5b8f-8678-56b4dc217140", "name": "H_5", "type": "floor", @@ -3554,5 +3554,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCFloor" } diff --git a/test/resources/Message.1.json b/test/resources/Message.1.json index b288255a..1ef9cd9e 100644 --- a/test/resources/Message.1.json +++ b/test/resources/Message.1.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "type": "message", "uid": "540862f3-ea30-5b8f-8678-56b4dc217140", "image": "icon ion-android-hand stapps-color-red-dark", @@ -13,5 +13,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCMessage" } diff --git a/test/resources/Message.2.json b/test/resources/Message.2.json index d3823975..51b001ec 100644 --- a/test/resources/Message.2.json +++ b/test/resources/Message.2.json @@ -1,6 +1,8 @@ { - "validationErrorNames": ["enum"], - "scData": { + "errorNames": [ + "enum" + ], + "instance": { "type": "invalid-value-in-schema", "uid": "540862f3-ea30-5b8f-8678-56b4dc217140", "image": "icon ion-android-hand stapps-color-red-dark", @@ -11,7 +13,8 @@ ], "origin": { "indexed": "2018-09-11T12:30:00Z", - "name": "Dummy" + "name": "foo" } - } + }, + "schema": "SCMessage" } diff --git a/test/resources/Message.3.json b/test/resources/Message.3.json index 499ffe0b..fa95698e 100644 --- a/test/resources/Message.3.json +++ b/test/resources/Message.3.json @@ -1,6 +1,6 @@ { - "validationErrorNames": ["additionalProperties"], - "scData": { + "errorNames": ["additionalProperties"], + "instance": { "type": "message", "invalid-non-existing-key-in-schema": 1, "uid": "540862f3-ea30-5b8f-8678-56b4dc217140", @@ -14,5 +14,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCMessage" } diff --git a/test/resources/Organization.json b/test/resources/Organization.json index dc41f945..1034d5f4 100644 --- a/test/resources/Organization.json +++ b/test/resources/Organization.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "type": "organization", "uid": "540862f3-ea30-5b8f-8678-56b4dc217140", "name": "Technische Universität Berlin", @@ -8,5 +8,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCOrganization" } diff --git a/test/resources/Person.1.json b/test/resources/Person.1.json index caf5b0df..22af4ea6 100644 --- a/test/resources/Person.1.json +++ b/test/resources/Person.1.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "type": "person", "uid": "540862f3-ea30-5b8f-8678-56b4dc217140", "givenName": "Michael", @@ -12,5 +12,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCPerson" } diff --git a/test/resources/Person.2.json b/test/resources/Person.2.json index 8ed7a43f..a967d3a4 100644 --- a/test/resources/Person.2.json +++ b/test/resources/Person.2.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "type": "person", "uid": "540862f3-ea30-5b8f-8678-56b4dc217140", "givenName": "Michael", @@ -12,5 +12,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCPerson" } diff --git a/test/resources/Person.3.json b/test/resources/Person.3.json index c8300383..1dfb337d 100644 --- a/test/resources/Person.3.json +++ b/test/resources/Person.3.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "type": "person", "familyName": "Mustermann", "givenName": "Erika", @@ -83,5 +83,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCPerson" } diff --git a/test/resources/PointOfInterest.1.json b/test/resources/PointOfInterest.1.json index b1224ae6..e3ecb556 100644 --- a/test/resources/PointOfInterest.1.json +++ b/test/resources/PointOfInterest.1.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "uid": "2e925b84-3c99-5df2-a289-62be7a4ae512", "name": "Validierer (UB)", "type": "point of interest", @@ -108,5 +108,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCPointOfInterest" } diff --git a/test/resources/PointOfInterest.2.json b/test/resources/PointOfInterest.2.json index 9b7dc739..7b2ee536 100644 --- a/test/resources/PointOfInterest.2.json +++ b/test/resources/PointOfInterest.2.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "uid": "1cf75fa0-86dc-5704-8cb4-bd80cf02e640", "name": "Drucker 1 (IG)", "type": "point of interest", @@ -296,5 +296,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCPointOfInterest" } diff --git a/test/resources/Room.1.json b/test/resources/Room.1.json index 66b76af1..3118d72e 100644 --- a/test/resources/Room.1.json +++ b/test/resources/Room.1.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "geo": { "point": { "type": "Point", @@ -30,5 +30,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCRoom" } diff --git a/test/resources/Room.2.json b/test/resources/Room.2.json index f2069ec0..5f64b835 100644 --- a/test/resources/Room.2.json +++ b/test/resources/Room.2.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "geo": { "point": { "type": "Point", @@ -24,5 +24,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCRoom" } diff --git a/test/resources/Room.3.json b/test/resources/Room.3.json index 23dac76b..773c486b 100644 --- a/test/resources/Room.3.json +++ b/test/resources/Room.3.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "geo": { "point": { "type": "Point", @@ -188,5 +188,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCRoom" } diff --git a/test/resources/Room.4.json b/test/resources/Room.4.json index f1d6796e..6b1f5ad3 100644 --- a/test/resources/Room.4.json +++ b/test/resources/Room.4.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "uid": "d7ce5623-ad47-5976-bdd3-7cf551729516", "name": "Poolraum (HoF)", "type": "room", @@ -76,5 +76,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCRoom" } diff --git a/test/resources/SearchRequest.1.json b/test/resources/SearchRequest.1.json index ae6e1d42..21272976 100644 --- a/test/resources/SearchRequest.1.json +++ b/test/resources/SearchRequest.1.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "query": "*", "filter": { "arguments": { @@ -32,5 +32,6 @@ }, "type": "boolean" } - } + }, + "schema": "SCSearchRequest" } diff --git a/test/resources/Semester.1.json b/test/resources/Semester.1.json index 6f5226bc..accfb0e8 100644 --- a/test/resources/Semester.1.json +++ b/test/resources/Semester.1.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "uid": "b621f5b5-dd5d-5730-9e2e-e4ba52011388", "type": "semester", "name": "Wintersemester 2017/2018", @@ -14,5 +14,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCSemester" } diff --git a/test/resources/Semester.2.json b/test/resources/Semester.2.json index 58e2f37e..9598a418 100644 --- a/test/resources/Semester.2.json +++ b/test/resources/Semester.2.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "uid": "aacd5611-b5be-54ce-b39f-c52f7e9a631d", "type": "semester", "name": "Sommersemester 2018", @@ -16,5 +16,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCSemester" } diff --git a/test/resources/Setting.1.json b/test/resources/Setting.1.json index bc1e4bb8..28e4e33a 100644 --- a/test/resources/Setting.1.json +++ b/test/resources/Setting.1.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "categories": [ "privacy" ], @@ -27,5 +27,6 @@ }, "type": "setting", "uid": "540862f3-ea30-5b8f-8678-56b4dc217642" - } + }, + "schema": "SCSetting" } diff --git a/test/resources/Setting.2.json b/test/resources/Setting.2.json index ef7acf46..dec11ab7 100644 --- a/test/resources/Setting.2.json +++ b/test/resources/Setting.2.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "categories": [ "privacy" ], @@ -37,5 +37,6 @@ }, "type": "setting", "uid": "540862f3-ea30-5b8f-8678-56b4dc217642" - } + }, + "schema": "SCSetting" } diff --git a/test/resources/Ticket.json b/test/resources/Ticket.json index 30192e82..10254362 100644 --- a/test/resources/Ticket.json +++ b/test/resources/Ticket.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "type": "ticket", "name": "Ticket", "uid": "7257a1d7-47ac-4acc-a8cc-3f9ac6442e5d", @@ -39,5 +39,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCTicket" } diff --git a/test/resources/Tour.1.json b/test/resources/Tour.1.json index b141008f..543b9406 100644 --- a/test/resources/Tour.1.json +++ b/test/resources/Tour.1.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "uid": "7257a1d7-47ac-4acc-a8cc-3f9ac6442e5d", "type": "tour", "name": "Stundenplan erstellen", @@ -99,5 +99,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCTour" } diff --git a/test/resources/Tour.2.json b/test/resources/Tour.2.json index 05921245..fcbaaf9e 100644 --- a/test/resources/Tour.2.json +++ b/test/resources/Tour.2.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "uid": "7257a1d7-47ac-4acc-a8cc-3f9ac6442e5d", "type": "tour", "name": "Favorisierte Essensorte", @@ -129,5 +129,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCTour" } diff --git a/test/resources/Video.1.json b/test/resources/Video.1.json index 26df2fe9..f87276a3 100644 --- a/test/resources/Video.1.json +++ b/test/resources/Video.1.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "type": "video", "uid": "540862f3-ea30-5b8f-8678-56b4dc217642", "url": "https://vimeo.com/1084537", @@ -9,5 +9,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCVideo" } diff --git a/test/resources/Video.2.json b/test/resources/Video.2.json index 33c305a6..eecffa75 100644 --- a/test/resources/Video.2.json +++ b/test/resources/Video.2.json @@ -1,6 +1,6 @@ { - "validationErrorNames": [], - "scData": { + "errorNames": [], + "instance": { "type": "video", "uid": "540862f3-ea30-5b8f-8678-56b4dc217642", "url": "https://vimeo.com/1084537", @@ -46,5 +46,6 @@ "indexed": "2018-09-11T12:30:00Z", "name": "Dummy" } - } + }, + "schema": "SCVideo" }