mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-23 00:13:16 +00:00
getDocumentDetailByIdのスタブを実装
This commit is contained in:
parent
f326771aaf
commit
527d3c309f
|
@ -115,7 +115,12 @@ public class LacertaLibraryStubImpl implements LacertaLibrary {
|
||||||
return libraryItemPage;
|
return libraryItemPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
private DocumentDetail generateStubDocumentDetail(String id) {
|
private DocumentDetail generateStubDocumentDetail(String id) throws IllegalArgumentException {
|
||||||
|
|
||||||
|
if (Objects.isNull(id)) {
|
||||||
|
throw new IllegalArgumentException("id is null");
|
||||||
|
}
|
||||||
|
|
||||||
DocumentMeta documentMeta = new DocumentMeta();
|
DocumentMeta documentMeta = new DocumentMeta();
|
||||||
documentMeta.setId(id);
|
documentMeta.setId(id);
|
||||||
documentMeta.setTitle("FakeDocument" + faker.book().title());
|
documentMeta.setTitle("FakeDocument" + faker.book().title());
|
||||||
|
@ -161,7 +166,7 @@ public class LacertaLibraryStubImpl implements LacertaLibrary {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public DocumentDetail getDocumentDetailById(String id) {
|
public DocumentDetail getDocumentDetailById(String id) throws IllegalArgumentException {
|
||||||
return null;
|
return generateStubDocumentDetail(id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user