Title: EventResponse cannot be constructed during tests · Issue #57 · SiftScience/sift-java · GitHub
Open Graph Title: EventResponse cannot be constructed during tests · Issue #57 · SiftScience/sift-java
X Title: EventResponse cannot be constructed during tests · Issue #57 · SiftScience/sift-java
Description: I'm writing a local implementation of the Sift client and I'm adding integration tests. My (simplified) interface is interface SiftPPService { fun createOrder(event: SiftPPCreateOrderEvent): EventResponse } And this interface has both a ...
Open Graph Description: I'm writing a local implementation of the Sift client and I'm adding integration tests. My (simplified) interface is interface SiftPPService { fun createOrder(event: SiftPPCreateOrderEvent): EventR...
X Description: I'm writing a local implementation of the Sift client and I'm adding integration tests. My (simplified) interface is interface SiftPPService { fun createOrder(event: SiftPPCreateOrderEvent)...
Opengraph URL: https://github.com/SiftScience/sift-java/issues/57
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"EventResponse cannot be constructed during tests","articleBody":"I'm writing a local implementation of the Sift client and I'm adding integration tests. My (simplified) interface is\r\n\r\n```\r\ninterface SiftPPService {\r\n fun createOrder(event: SiftPPCreateOrderEvent): EventResponse\r\n}\r\n```\r\nAnd this interface has both a local and a remote implementation.\r\nIn the Local implementation I have to construct a `com.siftscience.EventResponse` object but this has a protected constructor so cannot be done. This is required in order to test scenario like 'what happens if the API returns a very specific fraud score or a specific error code'\r\n\r\nIs there another way to build a EventResponse in a test without performing a remote call to the Sift API?\r\nNote that `EventResponseBody` can be constructed but EventResponse not.","author":{"url":"https://github.com/lorenzo-bc","@type":"Person","name":"lorenzo-bc"},"datePublished":"2020-08-18T18:26:05.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/57/sift-java/issues/57"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:c6a714f5-7837-1dd5-2268-9603df513477 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B1A2:3556CB:74B207F:9D08A7E:698CCE31 |
| html-safe-nonce | 821d83d352a3dedf5dd44f4bc594854cc3865849eb1f976563e901f19a832b53 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMUEyOjM1NTZDQjo3NEIyMDdGOjlEMDhBN0U6Njk4Q0NFMzEiLCJ2aXNpdG9yX2lkIjoiNTc5ODc3MTEwMzQyNjcyNzQ3MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 643a9dcf1d1a717fe32b83d0e4016d57ff4a5a6050bb91603f154a8c267a2aa7 |
| hovercard-subject-tag | issue:681243926 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/SiftScience/sift-java/57/issue_layout |
| twitter:image | https://opengraph.githubassets.com/42db1b1544014e9316cc0ca49b6b6bbb46b91c7559fe75999133934871400eb0/SiftScience/sift-java/issues/57 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/42db1b1544014e9316cc0ca49b6b6bbb46b91c7559fe75999133934871400eb0/SiftScience/sift-java/issues/57 |
| og:image:alt | I'm writing a local implementation of the Sift client and I'm adding integration tests. My (simplified) interface is interface SiftPPService { fun createOrder(event: SiftPPCreateOrderEvent): EventR... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | lorenzo-bc |
| hostname | github.com |
| expected-hostname | github.com |
| None | 640eeb7b6ff4d8d106235d228c0c286e82592d4d2403227b5b2b4fc5832297a4 |
| turbo-cache-control | no-preview |
| go-import | github.com/SiftScience/sift-java git https://github.com/SiftScience/sift-java.git |
| octolytics-dimension-user_id | 836132 |
| octolytics-dimension-user_login | SiftScience |
| octolytics-dimension-repository_id | 69907865 |
| octolytics-dimension-repository_nwo | SiftScience/sift-java |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 69907865 |
| octolytics-dimension-repository_network_root_nwo | SiftScience/sift-java |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3d444f0a47beeeac94cddbb51c91ab408befe8d4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width