-
Notifications
You must be signed in to change notification settings - Fork 3
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
Use strings for IDs instead of typeId type #183
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #183 +/- ##
==========================================
- Coverage 77.58% 77.03% -0.55%
==========================================
Files 33 33
Lines 812 810 -2
Branches 80 80
==========================================
- Hits 630 624 -6
- Misses 135 139 +4
Partials 47 47
|
* @return An [Exchange] containing the requested exchange. | ||
* @throws TbdexResponseException for request or response errors. | ||
*/ | ||
fun getExchange(pfiDid: String, requesterDid: Did, exchangeId: TypeId): Exchange { |
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.
rip
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.
salut
httpclient/src/test/kotlin/tbdex/sdk/httpclient/TbdexHttpClientTest.kt
Outdated
Show resolved
Hide resolved
Co-authored-by: Diane Huxley <dhuxley@tbd.email>
@@ -55,7 +55,7 @@ class SubmitCloseTest : ServerTest() { | |||
|
|||
@Test | |||
fun `returns NotFound if exchange doesn't exist`() = runBlocking { | |||
val close = createClose(TypeId.generate(MessageKind.close.name)) | |||
val close = createClose(TypeId.generate(MessageKind.rfq.name).toString()) |
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.
nice
@@ -107,7 +107,7 @@ class TbdexHttpClientTest { | |||
|
|||
server.enqueue(MockResponse().setResponseCode(HttpURLConnection.HTTP_ACCEPTED)) | |||
|
|||
val rfq = TestData.getRfq(pfiDid.uri, TypeId.generate("offering")) | |||
val rfq = TestData.getRfq(pfiDid.uri, TypeId.generate("offering").toString()) |
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.
ditto #183 (comment)
@@ -116,7 +116,7 @@ class TbdexHttpClientTest { | |||
|
|||
server.enqueue(MockResponse().setResponseCode(HttpURLConnection.HTTP_ACCEPTED)) | |||
|
|||
val rfq = TestData.getRfq(pfiDid.uri, TypeId.generate("offering")) | |||
val rfq = TestData.getRfq(pfiDid.uri, TypeId.generate("offering").toString()) |
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.
ditto #183 (comment)
@@ -144,7 +144,7 @@ class TbdexHttpClientTest { | |||
.setResponseCode(HttpURLConnection.HTTP_BAD_REQUEST) | |||
) | |||
|
|||
val rfq = TestData.getRfq(pfiDid.uri, TypeId.generate("offering")) | |||
val rfq = TestData.getRfq(pfiDid.uri, TypeId.generate("offering").toString()) |
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.
ditto #183 (comment)
@@ -176,7 +176,7 @@ class TbdexHttpClientTest { | |||
.setResponseCode(HttpURLConnection.HTTP_BAD_REQUEST) | |||
) | |||
|
|||
val rfq = TestData.getRfq(pfiDid.uri, TypeId.generate("offering")) | |||
val rfq = TestData.getRfq(pfiDid.uri, TypeId.generate("offering").toString()) |
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.
ditto #183 (comment)
config/detekt.yml
Outdated
@@ -60,7 +57,7 @@ exceptions: | |||
ReturnFromFinally: | |||
active: true | |||
SwallowedException: | |||
active: true | |||
active: false |
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.
i know there's a couple places where we're suppressing this exception and it is not pretty, but i think we want this check for when we're accidentally eating an exception without doing something about it
closes #182