@@ -47,7 +47,7 @@ class SessionGeneratorTest {
47
47
}
48
48
49
49
@Test
50
- fun generateNewSessionID_generatesValidSessionState () {
50
+ fun generateNewSessionID_generatesValidSessionDetails () {
51
51
val sessionGenerator = SessionGenerator (collectEvents = true )
52
52
53
53
sessionGenerator.generateNewSession()
@@ -68,32 +68,32 @@ class SessionGeneratorTest {
68
68
69
69
sessionGenerator.generateNewSession()
70
70
71
- val firstSessionState = sessionGenerator.currentSession
71
+ val firstSessionDetails = sessionGenerator.currentSession
72
72
73
- assertThat(isValidSessionId(firstSessionState .sessionId)).isTrue()
74
- assertThat(isValidSessionId(firstSessionState .firstSessionId)).isTrue()
75
- assertThat(firstSessionState .firstSessionId).isEqualTo(firstSessionState .sessionId)
76
- assertThat(firstSessionState .sessionIndex).isEqualTo(0 )
73
+ assertThat(isValidSessionId(firstSessionDetails .sessionId)).isTrue()
74
+ assertThat(isValidSessionId(firstSessionDetails .firstSessionId)).isTrue()
75
+ assertThat(firstSessionDetails .firstSessionId).isEqualTo(firstSessionDetails .sessionId)
76
+ assertThat(firstSessionDetails .sessionIndex).isEqualTo(0 )
77
77
78
78
sessionGenerator.generateNewSession()
79
- val secondSessionState = sessionGenerator.currentSession
79
+ val secondSessionDetails = sessionGenerator.currentSession
80
80
81
- assertThat(isValidSessionId(secondSessionState .sessionId)).isTrue()
82
- assertThat(isValidSessionId(secondSessionState .firstSessionId)).isTrue()
81
+ assertThat(isValidSessionId(secondSessionDetails .sessionId)).isTrue()
82
+ assertThat(isValidSessionId(secondSessionDetails .firstSessionId)).isTrue()
83
83
// Ensure the new firstSessionId is equal to the first Session ID from earlier
84
- assertThat(secondSessionState .firstSessionId).isEqualTo(firstSessionState .sessionId)
84
+ assertThat(secondSessionDetails .firstSessionId).isEqualTo(firstSessionDetails .sessionId)
85
85
// Session Index should increase
86
- assertThat(secondSessionState .sessionIndex).isEqualTo(1 )
86
+ assertThat(secondSessionDetails .sessionIndex).isEqualTo(1 )
87
87
88
88
// Do a third round just in case
89
89
sessionGenerator.generateNewSession()
90
- val thirdSessionState = sessionGenerator.currentSession
90
+ val thirdSessionDetails = sessionGenerator.currentSession
91
91
92
- assertThat(isValidSessionId(thirdSessionState .sessionId)).isTrue()
93
- assertThat(isValidSessionId(thirdSessionState .firstSessionId)).isTrue()
92
+ assertThat(isValidSessionId(thirdSessionDetails .sessionId)).isTrue()
93
+ assertThat(isValidSessionId(thirdSessionDetails .firstSessionId)).isTrue()
94
94
// Ensure the new firstSessionId is equal to the first Session ID from earlier
95
- assertThat(thirdSessionState .firstSessionId).isEqualTo(firstSessionState .sessionId)
95
+ assertThat(thirdSessionDetails .firstSessionId).isEqualTo(firstSessionDetails .sessionId)
96
96
// Session Index should increase
97
- assertThat(thirdSessionState .sessionIndex).isEqualTo(2 )
97
+ assertThat(thirdSessionDetails .sessionIndex).isEqualTo(2 )
98
98
}
99
99
}
0 commit comments