mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2026-11-02 11:37:37 +00:00
getDocumentDetailByIdのスタブを実装
This commit is contained in:
1 file changed
+8
-3
@@ -115,7 +115,12 @@ public class LacertaLibraryStubImpl implements LacertaLibrary {
|
||||
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.setId(id);
|
||||
documentMeta.setTitle("FakeDocument" + faker.book().title());
|
||||
@@ -161,7 +166,7 @@ public class LacertaLibraryStubImpl implements LacertaLibrary {
|
||||
}
|
||||
|
||||
@Override
|
||||
public DocumentDetail getDocumentDetailById(String id) {
|
||||
return null;
|
||||
public DocumentDetail getDocumentDetailById(String id) throws IllegalArgumentException {
|
||||
return generateStubDocumentDetail(id);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user