Skip to content

Commit d63a9d5

Browse files
committed
Test Boundless DRM.
1 parent 3a02181 commit d63a9d5

4 files changed

Lines changed: 479 additions & 6 deletions

File tree

simplified-books-borrowing/src/main/java/org/nypl/simplified/books/borrowing/internal/BorrowBoundless.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import org.nypl.simplified.books.book_database.api.BookDatabaseEntryFormatHandle
2626
import org.nypl.simplified.books.book_database.api.BookDatabaseEntryFormatHandle.BookDatabaseEntryFormatHandleEPUB
2727
import org.nypl.simplified.books.book_database.api.BookDatabaseEntryFormatHandle.BookDatabaseEntryFormatHandlePDF
2828
import org.nypl.simplified.books.borrowing.BorrowContextType
29-
import org.nypl.simplified.books.borrowing.internal.BorrowErrorCodes.acsNotSupported
29+
import org.nypl.simplified.books.borrowing.internal.BorrowErrorCodes.boundlessNotSupported
3030
import org.nypl.simplified.books.borrowing.subtasks.BorrowSubtaskException
3131
import org.nypl.simplified.books.borrowing.subtasks.BorrowSubtaskException.BorrowSubtaskFailed
3232
import org.nypl.simplified.books.borrowing.subtasks.BorrowSubtaskFactoryType
@@ -171,11 +171,13 @@ class BorrowBoundless private constructor() : BorrowSubtaskType {
171171
if (boundless == null) {
172172
context.taskRecorder.currentStepFailed(
173173
message = "This build of the application does not support Boundless DRM.",
174-
errorCode = acsNotSupported,
174+
errorCode = boundlessNotSupported,
175175
extraMessages = listOf()
176176
)
177177
throw BorrowSubtaskFailed()
178178
}
179+
180+
context.taskRecorder.currentStepSucceeded("Boundless DRM is supported.")
179181
return boundless
180182
}
181183

simplified-books-borrowing/src/main/java/org/nypl/simplified/books/borrowing/internal/BorrowErrorCodes.kt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,8 @@ object BorrowErrorCodes {
1515
const val acsTimedOut = "acsTimedOut"
1616
const val acsUnparseableACSM = "acsUnparseableACSM"
1717
const val audioStrategyFailed = "audioStrategyFailed"
18-
const val axisNowFulfillmentFailed = "axisNowFulfillmentFailed"
19-
const val axisNowNotSupported = "axisNowNotSupported"
2018
const val bookDatabaseFailed = "bookDatabaseFailed"
21-
const val contentFileNotFound = "contentFileNotFound"
19+
const val boundlessNotSupported = "boundlessNotSupported"
2220
const val httpConnectionFailed = "httpConnectionFailed"
2321
const val httpContentTypeIncompatible = "httpContentTypeIncompatible"
2422
const val httpRequestFailed = "httpRequestFailed"
@@ -29,7 +27,6 @@ object BorrowErrorCodes {
2927
const val noSupportedAcquisitions = "noSupportedAcquisitions"
3028
const val opdsFeedEntryHoldable = "opdsFeedEntryHoldable"
3129
const val opdsFeedEntryLoanable = "opdsFeedEntryLoanable"
32-
const val opdsFeedEntryNoNext = "opdsFeedEntryNoNext"
3330
const val opdsFeedEntryParseError = "opdsFeedEntryParseError"
3431
const val profileNotFound = "profileNotFound"
3532
const val requiredURIMissing = "requiredURIMissing"

0 commit comments

Comments
 (0)