-
Notifications
You must be signed in to change notification settings - Fork 10
Add use cases for Publish Dataset text settings #422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
448cb00
5067542
a4b6fd4
77b6888
e191ba4
1631011
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import { UseCase } from '../../../core/domain/useCases/UseCase' | ||
| import { IDataverseInfoRepository } from '../repositories/IDataverseInfoRepository' | ||
|
|
||
| export class GetDatasetPublishPopupCustomText implements UseCase<string> { | ||
| private dataverseInfoRepository: IDataverseInfoRepository | ||
|
|
||
| constructor(dataverseInfoRepository: IDataverseInfoRepository) { | ||
| this.dataverseInfoRepository = dataverseInfoRepository | ||
| } | ||
|
|
||
| /** | ||
| * Returns a string containing custom text for the Publish Dataset modal. | ||
| * | ||
| * @returns {Promise<string>} | ||
| */ | ||
| async execute(): Promise<string> { | ||
| return await this.dataverseInfoRepository.getDatasetPublishPopupCustomText() | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| import { UseCase } from '../../../core/domain/useCases/UseCase' | ||
| import { IDataverseInfoRepository } from '../repositories/IDataverseInfoRepository' | ||
|
|
||
| export class GetPublishDatasetDisclaimerText implements UseCase<string> { | ||
| private dataverseInfoRepository: IDataverseInfoRepository | ||
|
|
||
| constructor(dataverseInfoRepository: IDataverseInfoRepository) { | ||
| this.dataverseInfoRepository = dataverseInfoRepository | ||
| } | ||
|
|
||
| /** | ||
| * Returns a string containing the disclaimer text for the Publish Dataset modal. | ||
| * | ||
| * @returns {Promise<string>} | ||
| */ | ||
| async execute(): Promise<string> { | ||
| return await this.dataverseInfoRepository.getPublishDatasetDisclaimerText() | ||
| } | ||
|
Comment on lines
+4
to
+18
|
||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This new use case doesn’t have a corresponding unit test under
test/unit/info/(other info use cases do). Add tests covering the success path (repository returns text) and error propagation (repository rejects).