-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor the SessionOrchestrator tests to use a real PayloadFactory (#…
…854) ## Goal There was too much logic in PayloadFactoryImpl for us to faithfully test SessionOrchestratorImpl without a really complex FakePayloadFactory. As such, we'll use a real one, and do the faking at the `PayloadMessageCollator` level so we can validate the whole `SessionMessage` to ensure they match.
- Loading branch information
Showing
11 changed files
with
376 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
embrace-android-sdk/src/test/java/io/embrace/android/embracesdk/fakes/FakePayloadCollator.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package io.embrace.android.embracesdk.fakes | ||
|
||
import io.embrace.android.embracesdk.payload.Session | ||
import io.embrace.android.embracesdk.payload.SessionMessage | ||
import io.embrace.android.embracesdk.session.message.FinalEnvelopeParams | ||
import io.embrace.android.embracesdk.session.message.InitialEnvelopeParams | ||
import io.embrace.android.embracesdk.session.message.PayloadMessageCollator | ||
|
||
internal class FakePayloadCollator : PayloadMessageCollator { | ||
override fun buildInitialSession(params: InitialEnvelopeParams): Session { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
override fun buildFinalSessionMessage(params: FinalEnvelopeParams.SessionParams): SessionMessage { | ||
TODO("Not yet implemented") | ||
} | ||
|
||
override fun buildFinalBackgroundActivityMessage(params: FinalEnvelopeParams.BackgroundActivityParams): SessionMessage { | ||
TODO("Not yet implemented") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.