From f71003834907d614cfd0030be30739481a648bfc Mon Sep 17 00:00:00 2001 From: Thiago Date: Tue, 1 Oct 2024 16:42:33 -0400 Subject: [PATCH] Creates series model class Issue: documentacao-e-tarefas/desenvolvimento_e_infra#892 Signed-off-by: Thiago --- src/GraphQL/Model/Series.php | 100 +++++++++++++++++++++++++++++ tests/GraphQL/Model/SeriesTest.php | 43 +++++++++++++ 2 files changed, 143 insertions(+) create mode 100644 src/GraphQL/Model/Series.php create mode 100644 tests/GraphQL/Model/SeriesTest.php diff --git a/src/GraphQL/Model/Series.php b/src/GraphQL/Model/Series.php new file mode 100644 index 0000000..885f663 --- /dev/null +++ b/src/GraphQL/Model/Series.php @@ -0,0 +1,100 @@ +getData('seriesId'); + } + + public function setSeriesId(string $seriesId): void + { + $this->setData('seriesId', $seriesId); + } + + public function getSeriesType(): string + { + return $this->getData('seriesType'); + } + + public function setSeriesType(string $seriesType): void + { + $this->setData('seriesType', $seriesType); + } + + public function getSeriesName(): string + { + return $this->getData('seriesName'); + } + + public function setSeriesName(string $seriesName): void + { + $this->setData('seriesName', $seriesName); + } + + public function getIssnPrint(): string + { + return $this->getData('issnPrint'); + } + + public function setIssnPrint(string $issnPrint): void + { + $this->setData('issnPrint', $issnPrint); + } + + public function getIssnDigital(): string + { + return $this->getData('issnDigital'); + } + + public function setIssnDigital(string $issnDigital): void + { + $this->setData('issnDigital', $issnDigital); + } + + public function getSeriesUrl(): string + { + return $this->getData('seriesUrl'); + } + + public function setSeriesUrl(string $seriesUrl): void + { + $this->setData('seriesUrl', $seriesUrl); + } + + public function getSeriesDescription(): string + { + return $this->getData('seriesDescription'); + } + + public function setSeriesDescription(string $seriesDescription): void + { + $this->setData('seriesDescription', $seriesDescription); + } + + public function getSeriesCfpUrl(): string + { + return $this->getData('seriesCfpUrl'); + } + + public function setSeriesCfpUrl(string $seriesCfpUrl): void + { + $this->setData('seriesCfpUrl', $seriesCfpUrl); + } + + public function getImprintId(): string + { + return $this->getData('imprintId'); + } + + public function setImprintId(string $imprintId): void + { + $this->setData('imprintId', $imprintId); + } +} diff --git a/tests/GraphQL/Model/SeriesTest.php b/tests/GraphQL/Model/SeriesTest.php new file mode 100644 index 0000000..b60c076 --- /dev/null +++ b/tests/GraphQL/Model/SeriesTest.php @@ -0,0 +1,43 @@ +setSeriesId($seriesId); + $series->setSeriesType($seriesType); + $series->setSeriesName($seriesName); + $series->setIssnPrint($issnPrint); + $series->setIssnDigital($issnDigital); + $series->setSeriesUrl($seriesUrl); + $series->setSeriesDescription($seriesDescription); + $series->setSeriesCfpUrl($seriesCfpUrl); + $series->setImprintId($imprintId); + + $this->assertSame($seriesId, $series->getSeriesId()); + $this->assertSame($seriesType, $series->getSeriesType()); + $this->assertSame($seriesName, $series->getSeriesName()); + $this->assertSame($issnPrint, $series->getIssnPrint()); + $this->assertSame($issnDigital, $series->getIssnDigital()); + $this->assertSame($seriesUrl, $series->getSeriesUrl()); + $this->assertSame($seriesDescription, $series->getSeriesDescription()); + $this->assertSame($seriesCfpUrl, $series->getSeriesCfpUrl()); + $this->assertSame($imprintId, $series->getImprintId()); + } +}