diff --git a/src/dto/concrete/BggThingDto.ts b/src/dto/concrete/BggThingDto.ts index dc2a3f9..f23da8f 100644 --- a/src/dto/concrete/BggThingDto.ts +++ b/src/dto/concrete/BggThingDto.ts @@ -84,6 +84,11 @@ export class BggThingDto implements IBggDto { }) minage!: number; + @JsonProperty() + @JsonClassType({ type: () => [String] }) + @JsonAlias({ values: ["@_value"] }) + seriescode!: string; + @JsonProperty() @JsonClassType({ type: () => [Array, [BggLinkDto]] }) @JsonManagedReference() @@ -140,4 +145,4 @@ export class BggThingDto implements IBggDto { using: (items: any[]) => items[0]?.item }) versions!: BggThingVersionDto[]; -} \ No newline at end of file +} diff --git a/test/unit/__fixtures__/response_thing_174620_rpgitem_withallrequestoptions.xml b/test/unit/__fixtures__/response_thing_174620_rpgitem_withallrequestoptions.xml new file mode 100644 index 0000000..d23210d --- /dev/null +++ b/test/unit/__fixtures__/response_thing_174620_rpgitem_withallrequestoptions.xml @@ -0,0 +1,452 @@ +HTTP/2 200 +server: nginx +access-control-allow-origin: * +content-encoding: gzip +via: 1.1 google +date: Wed, 04 Sep 2024 11:36:05 GMT +cache-control: s-maxage=30, max-age=3600 +etag: W/"a4a5e5233eb512b8a70354968a88d73b" +content-type: text/xml; charset="UTF-8" +content-length: 10476 +age: 5 +alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 +X-Firefox-Spdy: h2 + + + + + https://cf.geekdo-images.com/ebVYNsEsQTcKq84453Cchw__thumb/img/LBqdmg9G4uuiwjJ64qc_aDammi0=/fit-in/200x150/filters:strip_icc()/pic2442449.jpg + https://cf.geekdo-images.com/ebVYNsEsQTcKq84453Cchw__original/img/EVuk4WbEqJ3VZy_a30f2RKrRLgY=/0x0/filters:format(jpeg)/pic2442449.jpg + + + + Publisher Blurb

"The streets of Duskwall are haunted. By vengeful ghosts and cruel demons. By the masked spirit wardens and their lightning-hooks. By sharp-eyed inspectors and their gossiping + crows. By the alluring hawkers of vice and pleasure. By thieves and killers and scoundrels like you — the Blades in the Dark.

The noble elite grow ever richer from the profits of their leviathan-hunting + fleets and electroplasm refineries. The Bluecoats of the constabulary crack skulls and line their pockets with graft. The powerful crime syndicates leech coin from every business, brothel, drug den, and gambling house. And then + there's your crew of scoundrels: all the way down at the bottom rung. Can you make it to the top? What are you willing to do to get there? There's only one way to find out..."

Blades in the Dark is a tabletop + role-playing game about a gang of criminals seeking their fortunes on the haunted streets of Duskwall. There are heists, chases, occult mysteries, dangerous bargains, bloody skirmishes, and, above all, riches to be had if you're bold + enough.

You play to find out if your fledgling crew can thrive amidst the threats of rival gangs, powerful noble families, malicious ghosts, the Bluecoats of the city watch, and the siren song of your scoundrel’s + own vices.

 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + https://cf.geekdo-images.com/yVIIzWeWnkOQePkRXm5d3Q__thumb/img/0VAIhYvfeiRIeD6eG-7TzYA4L6Q=/fit-in/200x150/filters:strip_icc()/pic6903536.jpg + https://cf.geekdo-images.com/yVIIzWeWnkOQePkRXm5d3Q__original/img/ImC4HBQrtLP_5vUG9Hz_8GJP89M=/0x0/filters:format(jpeg)/pic6903536.jpg + + + + + + + + + + + + Publisher Blurb:

Blades in the Dark es un juego de rol sobre bandas de audaces criminales que buscan la forma de prosperar en las opresivas calles de una ciudad industrial de fantasía. Aquí + hay robos, persecuciones, misterios ocultistas, tratos peligrosos, escaramuzas sangrientas y, sobre todo, las riquezas que puedas conseguir… si eres lo suficientemente osado como para hacerte con ellas.

Deberás + superar, junto a tu incipiente banda, las amenazas de tus rivales, de poderosas familias nobles, fantasmas vengativos, los casacas azules de la guardia de la ciudad y tus propios vicios criminales, que te incitan como el canto de + una sirena. ¿Conseguirás ser alguien poderoso en el mundo criminal? ¿Qué estás dispuesto a hacer para llegar a la cima?

En este libro podrás + encontrar:


 Reglas para crear un personaje criminal a partir de los siguientes arquetipos: el Acechador, la Araña, la Máscara, el Sabueso, la Sanguijuela, el Sajador y el Susurro.
 + Reglas para crear una banda a partir de diferentes tipos definidos, como Asesinos, Bravos, Buhoneros, Contrabandistas, Secta o Sombras.
 Una mecánica básica sólida que garantiza la + preeminencia de la narrativa: la actitud que adopta un personaje al realizar una acción (desesperada, arriesgada o controlada) importa tanto como las puntuaciones que tiene en sus habilidades.
 Una mecánica + ágil para planificar operaciones criminales y quitarse de encima la pesadez habitual de hacer planes en la mesa de juego.
 Reglas para experimentos alquímicos, artefactos y misteriosos poderes + ocultistas, incluyendo reglas para jugar con fantasmas y otros seres extraños.
 Una guía de ambientación para la opresiva ciudad de Doskvol, con todos los mapas, facciones, PNJ, + maquinaciones y oportunidades que necesitas para jugar una partida de rol emocionante con gran libertad de movimientos.


 + + + + + + + + + + + + + + + From publisher blurb:

Blades in the Dark est un jeu de rôle qui met en scène un gang de criminels en quête de fortune dans les rues hantées de Duskvol. Vous y + trouverez braquages, poursuites, mystères occultes, marchandages dangereux, escarmouches sanglantes et, surtout, surtout, des richesses à prendre si vous êtes assez audacieux pour cela.

Vous + jouez à ce jeu pour savoir si votre bande fraichement constituée peut prospérer parmi les gangs rivaux, les puissantes familles nobles, les fantômes malveillants, sans oublier les "manteaux + bleus" de la ville...et les vices de votre propre personnage.

Le gameplay se concentre sur des activités criminelles appelées Scores. Une session de jeu consiste habituellement en 1 + ou 2 Scores, chacune suivie d'une récupération, de projets personnels et d'avancement pour les canailles et leur bande.

Dans Blades in the Dark, votre bande (crew) reçoit sa propre + "fiche de personnage" (choisie dans différentes classes, comme Culte, Voleurs ou Contrebandiers), gagne des XP, et augmente de niveau en même temps que les personnages. Au fur et à + mesure que vous faites avancer la bande, vous débloquez de nouvelles options et capacités pour les canailles et gravissez les échelons des factions dans la ville.

L'équipe + est un perso comme les autres

Le jeu dispose d'un mécanisme de résolution de base robuste qui demande au groupe de caractériser les actions comme désespérées, + risquées ou contrôlées. Chaque choix offre une gamme de résultats multiples, au-delà du simple succès ou de l'échec. Pour mettre en valeur la nature des + personnages, les joueurs peuvent accepter un marché avec le diable (un dé bonus avec des conditions...) pour augmenter leurs chances.

Un bon système pour simuler le travail d'équipe + est essentiel pour qu'un jeu sur un équipage de canailles fonctionne. Blades in the Dark met en avant une mécanique de travail d'équipe fun, cinématique et intuitive qui fait passer + l'action d'un personnage à l'autre au fur et à mesure qu'il se dirige vers l'objectif avec le soutien de ses équipiers.

Faire des plans de pro sans être un pro

De + nombreuses séances de JDR grippent lorsque la planification des joueurs/personnages est nécessaire pour entreprendre un" coup" complexe. Le groupe finit par discuter des options pendant des + heures -- parler du jeu plutôt que de jouer au jeu. Blades in the Dark évite ce travers grâce à un système de planification qui prend moins d'une minute: vous prenez quelques décisions + simples et vous y allez. De plus, les joueurs peuvent utiliser leur bonus de travail d'équipe pour activer un plan d'urgence, ce qui leur permet de passer à une scène de flash-back et de lancer une + action de mise en place que leur personnage a effectuée dans le passé.

L'univers

C'est durant l'année 847 de l'Imperium qui les îles brisées + par le Grand Cataclysme furent unies sous une seule règle - gloire à Sa Majesté l'Empereur Immortel.

Les esprits inquiets des morts, libres de parcourir le monde depuis que les + portes de la mort furent brisées, fondirent alors sur tout ce qui vit dans les terres mortes entre les villes.

Le port de Duskvol comme chaque ville-forteresse de l'Imperium, est entouré de + tours d'éclairs crépitants créant une barrière électrique que les esprits ne peuvent franchir. Selon la loi, les gardiens doivent incinérer tous les cadavres avec + un électroplasme pour empêcher les esprits de quitter leur corps. Cependant, les riches citoyens, les hérétiques des cultes des esprits et les criminels de tout poil font souvent en sorte + qu'un esprit échappe à la destruction de l'incinérateur. Les esprits hors la loi et les essences illégales qui en sont dérivées constituent alors une riche + opportunité de commerce pour le marché noir.

Duskvol est le port d'attache des gigantesques navires à vapeur des chasseurs de Léviathan. Le sang de ces démons + massifs est le catalyseur des huiles plasmiques raffinées qui alimentent la ville.

Duskvol est un lieu de richesse et de pauvreté, de science et de magie, d'ambition et de décadence.

 + + + + https://cf.geekdo-images.com/ebVYNsEsQTcKq84453Cchw__thumb/img/LBqdmg9G4uuiwjJ64qc_aDammi0=/fit-in/200x150/filters:strip_icc()/pic2442449.jpg + https://cf.geekdo-images.com/ebVYNsEsQTcKq84453Cchw__original/img/EVuk4WbEqJ3VZy_a30f2RKrRLgY=/0x0/filters:format(jpeg)/pic2442449.jpg + + + + + + + + + + + + From the back of the book:

Blades in the Dark is a tabletop role-playing game about a crew of daring scoundrels seeking their fortunes on the haunted streets of an industrial-fantasy city. There are + heists, chases, occult mysteries, dangerous bargains, bloody skirmishes, and, above all, riches to be had — if you're bold enough to seize them.

You and your fledgling crew must thrive amidst the threats + of rival gangs, powerful noble families, vengeful ghosts, the Bluecoats of the city watch, and the siren song of your scoundrel's own vices. Will you rise to power in the criminal underworld? What are you willing to do to get to + the top?

 + + + + + + + + + + + + + + + User summary:

Italian hardcover version.

 + + + + + + + + + + + + + + User summary:

PDF of the italian edition.

 + + + https://cf.geekdo-images.com/9W0iZBy6ywBGo_7PG-WHGg__thumb/img/fYifr9BL1JGCdKjMj1jmpru9780=/fit-in/200x150/filters:strip_icc()/pic6332251.jpg + https://cf.geekdo-images.com/9W0iZBy6ywBGo_7PG-WHGg__original/img/OMFNiQw1iEA3QTVqahEWXhId0ZM=/0x0/filters:format(jpeg)/pic6332251.jpg + + + + + + + + + + + + Hungarian version published under the brand Kalandhorizont Könyvek.

 + + + + + + + + + + + + + + Ostrza w mroku to gra fabularna o szajce Å›miaÅ‚ych Å‚otrów szukajÄ…cych szczęścia na nawiedzonych + ulicach fantastyczno-industrialnego miasta. Znajdziecie w niej skoki, poÅ›cigi, okultystyczne tajemnice, niebezpieczne ukÅ‚ady, krwawe potyczki oraz nieprzebrane bogactwa – jeÅ›li + tylko macie w sobie dość odwagi, by po nie siÄ™gnąć.

 + + + + + + + + + + + + + + + Ostrza w mroku to gra fabularna o szajce Å›miaÅ‚ych Å‚otrów szukajÄ…cych szczęścia na nawiedzonych + ulicach fantastyczno-industrialnego miasta. Znajdziecie w niej skoki, poÅ›cigi, okultystyczne tajemnice, niebezpieczne ukÅ‚ady, krwawe potyczki oraz nieprzebrane bogactwa - jeÅ›li + tylko macie w sobie dość odwagi, by po nie siÄ™gnąć.

Wasza nowo powstaÅ‚a szajka musi przetrwać + poÅ›ród innych gangów, potężnych rodów szlacheckich, żądnych zemsty duchów i Błękitnych + PÅ‚aszczy ze Straży Miejskiej oraz stawić czoÅ‚a kuszÄ…cej, lecz zepsutej pieÅ›ni wÅ‚asnych dusz. Czy + zdobÄ™dziecie wpÅ‚ywy w półświatku? Ile bÄ™dziecie gotowi poÅ›wiÄ™cić, + aby wspiąć siÄ™ na sam szczyt?

W podrÄ™czniku znajdziecie:

zasady tworzenia barwnych postaci Å‚otrów: + Czyhaczy, Ogarów, PajÄ…ków, Pijawek, Siepaczy, Szeptuchów, Åšciemniaczy
różnorodne Å‚otrowskie szajki: + Cieni, Dilerów, Kultystów, Oprychów, Przemytników, Zabójców
solidnÄ… mechanikÄ™, która stawia fikcjÄ™ + na pierwszym miejscu: sytuacja, w jakiej znajduje siÄ™ postać, jest równie ważna, co umiejÄ™tnoÅ›ci bohatera
szybkie + zasady planowania kryminalnych przedsiÄ™wzięć, pozwalajÄ…ce pominąć żmudne ustalanie kolejnych + posunięć krok po kroku
zasady opisujÄ…ce eksperymenty alchemiczne, majsterkowanie przy gadżetach oraz tajemne moce okultystyczne – w tym + reguÅ‚y umożliwiajÄ…ce granie duchami i jeszcze dziwniejszymi istotami
przewodnik po nawiedzonym Zmierzchomurzu wraz z mapami, opisami frakcji i bohaterów + niezależnych, szansami i zagrożeniami, za których sprawÄ… od razu zanurzycie siÄ™ w otwartym, reagujÄ…cym na wasze dziaÅ‚ania + Å›wiecie gry.

 + + + + https://cf.geekdo-images.com/bvRQLlqz9xfgy175WLo_Pw__thumb/img/2ymjzB-7Fx98RDR3rnOIMis3P4s=/fit-in/200x150/filters:strip_icc()/pic4166517.png + https://cf.geekdo-images.com/bvRQLlqz9xfgy175WLo_Pw__original/img/sdFI2SBx5qN47jt-OkWixRoUJTs=/0x0/filters:format(png)/pic4166517.png + + + + + + + + + + + + + + + https://cf.geekdo-images.com/9W0iZBy6ywBGo_7PG-WHGg__thumb/img/fYifr9BL1JGCdKjMj1jmpru9780=/fit-in/200x150/filters:strip_icc()/pic6332251.jpg + https://cf.geekdo-images.com/9W0iZBy6ywBGo_7PG-WHGg__original/img/OMFNiQw1iEA3QTVqahEWXhId0ZM=/0x0/filters:format(jpeg)/pic6332251.jpg + + + + + + + + + + + + 2015 Golden Geek díj: az év szerepjátéka

2016 Indie RPG Award: az év játéka, a legjobb termék, és a + legjobb támogatás

A Kések az éjben a nemzetközileg nagy sikerű Blades in the Dark asztali szerepjáték magyar változata, + ami olyan merész bajkeverÅ‘krÅ‘l szól, akik egy iparosodott fantasy város kísértetjárta utcáin próbálnak + szerencsét. Vannak balhék, üldözések, okkult rejtélyek, veszélyes alkuk, véres összecsapások, és mindenekelÅ‘tt + mérhetetlen gazdagság – már ha elég merészek vagytok ahhoz, hogy megszerezzétek.

Neked, és újonc bandádnak + a vetélytárs bandák, erÅ‘s nemesi családok, bosszúszomjas szellemek, a Kékkabátos városÅ‘rség, + és a bajkeverÅ‘itek saját vágyainak szirénéneke közt kell boldogulotok. Vajon felemelkedtek az alvilág élére? Mire + vagytok hajlandóak, hogy feljussatok a csúcsra?

- a kiadó kivonatából

 + + + + https://cf.geekdo-images.com/ebVYNsEsQTcKq84453Cchw__thumb/img/LBqdmg9G4uuiwjJ64qc_aDammi0=/fit-in/200x150/filters:strip_icc()/pic2442449.jpg + https://cf.geekdo-images.com/ebVYNsEsQTcKq84453Cchw__original/img/EVuk4WbEqJ3VZy_a30f2RKrRLgY=/0x0/filters:format(jpeg)/pic2442449.jpg + + + + + + + + + + + + Publisher Blurb

"The streets of Duskwall are haunted. By vengeful ghosts and cruel demons. By the masked spirit wardens and their lightning-hooks. By sharp-eyed inspectors and their gossiping + crows. By the alluring hawkers of vice and pleasure. By thieves and killers and scoundrels like you — the Blades in the Dark.

The noble elite grow ever richer from the profits of their leviathan-hunting + fleets and electroplasm refineries. The Bluecoats of the constabulary crack skulls and line their pockets with graft. The powerful crime syndicates leech coin from every business, brothel, drug den, and gambling house. And then + there's your crew of scoundrels: all the way down at the bottom rung. Can you make it to the top? What are you willing to do to get there? There's only one way to find out..."

Blades in the Dark is a + tabletop role-playing game about a gang of criminals seeking their fortunes on the haunted streets of Duskwall. There are heists, chases, occult mysteries, dangerous bargains, bloody skirmishes, and, above all, riches to be had if + you're bold enough.

You play to find out if your fledgling crew can thrive amidst the threats of rival gangs, powerful noble families, malicious ghosts, the Bluecoats of the city watch, and the siren song of your + scoundrel’s own vices.

 + + + + https://cf.geekdo-images.com/ebVYNsEsQTcKq84453Cchw__thumb/img/LBqdmg9G4uuiwjJ64qc_aDammi0=/fit-in/200x150/filters:strip_icc()/pic2442449.jpg + https://cf.geekdo-images.com/ebVYNsEsQTcKq84453Cchw__original/img/EVuk4WbEqJ3VZy_a30f2RKrRLgY=/0x0/filters:format(jpeg)/pic2442449.jpg + + + + + + + + + + + + The streets of Duskwall are haunted. By vengeful ghosts and cruel demons. By the masked spirit wardens and their lightning-hooks. By sharp-eyed inspectors and their gossiping crows. By the alluring hawkers of vice and + pleasure. By thieves and killers and scoundrels like you — the Blades in the Dark.

The noble elite grow ever richer from the profits of their leviathan-hunting fleets and electroplasm refineries. The + Bluecoats of the constabulary crack skulls and line their pockets with graft. The powerful crime syndicates leech coin from every business, brothel, drug den, and gambling house. And then there's your crew of scoundrels: all the + way down at the bottom rung. Can you make it to the top? What are you willing to do to get there? There's only one way to find out..."

Blades in the Dark is a tabletop role-playing game about a gang of + criminals seeking their fortunes on the haunted streets of Duskwall. There are heists, chases, occult mysteries, dangerous bargains, bloody skirmishes, and, above all, riches to be had if you're bold enough.

You + play to find out if your fledgling crew can thrive amidst the threats of rival gangs, powerful noble families, malicious ghosts, the Bluecoats of the city watch, and the siren song of your scoundrel’s own vices.

- + from the publisher's blurb

 + + + + https://cf.geekdo-images.com/yVIIzWeWnkOQePkRXm5d3Q__thumb/img/0VAIhYvfeiRIeD6eG-7TzYA4L6Q=/fit-in/200x150/filters:strip_icc()/pic6903536.jpg + https://cf.geekdo-images.com/yVIIzWeWnkOQePkRXm5d3Q__original/img/ImC4HBQrtLP_5vUG9Hz_8GJP89M=/0x0/filters:format(jpeg)/pic6903536.jpg + + + + + + + + + + + + Publisher Blurb:

Blades in the Dark es un juego de rol sobre bandas de audaces criminales que buscan la forma de prosperar en las opresivas calles de una ciudad industrial de fantasía. Aquí + hay robos, persecuciones, misterios ocultistas, tratos peligrosos, escaramuzas sangrientas y, sobre todo, las riquezas que puedas conseguir… si eres lo suficientemente osado como para hacerte con ellas.

Deberás + superar, junto a tu incipiente banda, las amenazas de tus rivales, de poderosas familias nobles, fantasmas vengativos, los casacas azules de la guardia de la ciudad y tus propios vicios criminales, que te incitan como el canto de + una sirena. ¿Conseguirás ser alguien poderoso en el mundo criminal? ¿Qué estás dispuesto a hacer para llegar a la cima?

En este libro podrás + encontrar:


 Reglas para crear un personaje criminal a partir de los siguientes arquetipos: el Acechador, la Araña, la Máscara, el Sabueso, la Sanguijuela, el Sajador y el Susurro.
 + Reglas para crear una banda a partir de diferentes tipos definidos, como Asesinos, Bravos, Buhoneros, Contrabandistas, Secta o Sombras.
 Una mecánica básica sólida que garantiza la + preeminencia de la narrativa: la actitud que adopta un personaje al realizar una acción (desesperada, arriesgada o controlada) importa tanto como las puntuaciones que tiene en sus habilidades.
 Una mecánica + ágil para planificar operaciones criminales y quitarse de encima la pesadez habitual de hacer planes en la mesa de juego.
 Reglas para experimentos alquímicos, artefactos y misteriosos poderes + ocultistas, incluyendo reglas para jugar con fantasmas y otros seres extraños.
 Una guía de ambientación para la opresiva ciudad de Doskvol, con todos los mapas, facciones, PNJ, + maquinaciones y oportunidades que necesitas para jugar una partida de rol emocionante con gran libertad de movimientos.


 + + + + https://cf.geekdo-images.com/j7Z9AOBuRUxway9kQPQ38w__thumb/img/4hPsb_6RIvbVt73ss4DAwbnD1rc=/fit-in/200x150/filters:strip_icc()/pic5356335.jpg + https://cf.geekdo-images.com/j7Z9AOBuRUxway9kQPQ38w__original/img/-7chbWA3ag0MW1dQVdphEMqs3BA=/0x0/filters:format(jpeg)/pic5356335.jpg + + + + + + + + + + + + Available for order and ship in April 2017.

 + + + https://cf.geekdo-images.com/8k7O_D8_sLAQXF9YtDRXrQ__thumb/img/gvYnMIQCFYny43JB7zKkFPeNvr4=/fit-in/200x150/filters:strip_icc()/pic5810905.jpg + https://cf.geekdo-images.com/8k7O_D8_sLAQXF9YtDRXrQ__original/img/1rL2z9Jpo1fut1nXYx7ScvZ8Y5k=/0x0/filters:format(jpeg)/pic5810905.jpg + + + + + + + + + + + + From publisher blurb:

Игра о группе + дерзких авантюристов, + основавших преступную + организацию на + тёмных улицах + индустриального + и в то же время мистического + города. Впереди + вас ждут ограбления, + погони, побеги, + опасные сделки, + кровавые схватки, + аферы, предательства, + победы и смерти.

Игра + покажет, сумеет + ли начинающая + команда выжить + среди банд-конкурентов, + могущественных + аристократических + семей, мстительных + призраков, городской + стражи и собственных + губительных страстей.

 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/unit/dtoparser/BggDtoParser.test.ts b/test/unit/dtoparser/BggDtoParser.test.ts index e798956..3c2d015 100644 --- a/test/unit/dtoparser/BggDtoParser.test.ts +++ b/test/unit/dtoparser/BggDtoParser.test.ts @@ -34,6 +34,22 @@ describe('BggDtoParsers', () => { expect(validationResult).toStrictEqual([]) }); + it('should parse Thing dto for rpgitem when xml response is valid', async () => { + + const xmlResponse: string = TextResponseByEndpoint['https://www.boardgamegeek.com/xmlapi2/thing?id=174620&comments=1&marketplace=1&pagesize=10&ratingcomments=1&stats=1&videos=1&type=rpgitem&versions=1']; + + const jsonData = await xmlToJsonParser.parseResponse(xmlResponse); + + const dtoParser: BggThingDtoParser = new BggThingDtoParser(); + + const dtoList: BggThingDto[] = await dtoParser.jsonToDto(jsonData); + + const dto: BggThingDto = dtoList[0] + + const validationResult = ValidatorTraverse(dto, reflectionProperties, reflectionPropertiesExcludable) + + expect(validationResult).toStrictEqual([]) + }); it('should parse Thing dto and intercept expected existing properties that are missing when xml response is valid', async () => { const xmlResponse: string = TextResponseByEndpoint['https://www.boardgamegeek.com/xmlapi2/thing?id=174430&comments=1&marketplace=1&pagesize=10&ratingcomments=1&stats=1&videos=1&type=boardgame&versions=1&withmissings']; @@ -315,4 +331,4 @@ describe('BggDtoParsers', () => { expect(validationResult).toStrictEqual([]) }); }); -}); \ No newline at end of file +}); diff --git a/test/unit/utils/Utils.ts b/test/unit/utils/Utils.ts index bffced2..1c7d157 100644 --- a/test/unit/utils/Utils.ts +++ b/test/unit/utils/Utils.ts @@ -4,6 +4,7 @@ import path from 'path'; export const TextResponseByEndpoint: Record = { 'https://www.boardgamegeek.com/xmlapi2/thing?id=174430&comments=1&marketplace=1&pagesize=10&ratingcomments=1&stats=1&videos=1&type=boardgame&versions=1': fs.readFileSync(path.join(__dirname, '..', '__fixtures__/response_thing_174430_withallrequestoptions.xml'), 'utf-8'), + 'https://www.boardgamegeek.com/xmlapi2/thing?id=174620&comments=1&marketplace=1&pagesize=10&ratingcomments=1&stats=1&videos=1&type=rpgitem&versions=1': fs.readFileSync(path.join(__dirname, '..', '__fixtures__/response_thing_174620_rpgitem_withallrequestoptions.xml'), 'utf-8'), 'https://www.boardgamegeek.com/xmlapi2/thing?id=174430&comments=1&marketplace=1&pagesize=10&ratingcomments=1&stats=1&videos=1&type=boardgame&versions=1&withmissings': fs.readFileSync(path.join(__dirname, '..', '__fixtures__/response_thing_174430_withallrequestoptions_withmissings.xml'), 'utf-8'), 'https://www.boardgamegeek.com/xmlapi2/collection?username=mattiabanned': fs.readFileSync(path.join(__dirname, '..', '__fixtures__/response_collection.xml'), 'utf-8'), 'https://www.boardgamegeek.com/xmlapi2/plays?username=mattiabanned': fs.readFileSync(path.join(__dirname, '..', '__fixtures__/response_play.xml'), 'utf-8'), @@ -31,4 +32,4 @@ export const WriteXmlParseByEndpoint = (outputName: string, contentData: string, } fs.writeFileSync(filePath, contentData, { encoding: 'utf-8' }) -} \ No newline at end of file +}