Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
@Test
fun `Track analytics event when creating new note`() {
val analyticsWrapperMock = //Mock
val noteAnalytics = NoteAnalytics(analyticsWrapperMock) //System under test
noteAnalytics.trackNewNoteEvent(NoteType.Supermarket)
//Verifies that specific call has happened
verify(exactly = 1) { analyticsWrapperMock.logEvent("NewNote", "SuperMarket") }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment