@@ -20,67 +20,67 @@ package models
2020import (
2121 "testing"
2222 "time"
23-
23+
2424 "github.com/stretchr/testify/assert"
2525)
2626
2727func TestQDevUserDataAllMetrics (t * testing.T ) {
2828 // Create a test user data object with all metrics
2929 userData := & QDevUserData {
3030 ConnectionId : 1 ,
31- UserId : "test-user-id" ,
32- Date : time .Now (),
33- DisplayName : "Test User" ,
34-
31+ UserId : "test-user-id" ,
32+ Date : time .Now (),
33+ DisplayName : "Test User" ,
34+
3535 // Set values for existing metrics
36- CodeReview_FindingsCount : 10 ,
37- CodeReview_SucceededEventCount : 11 ,
38- InlineChat_AcceptanceEventCount : 12 ,
39- InlineChat_AcceptedLineAdditions : 13 ,
40- InlineChat_AcceptedLineDeletions : 14 ,
41- InlineChat_DismissalEventCount : 15 ,
36+ CodeReview_FindingsCount : 10 ,
37+ CodeReview_SucceededEventCount : 11 ,
38+ InlineChat_AcceptanceEventCount : 12 ,
39+ InlineChat_AcceptedLineAdditions : 13 ,
40+ InlineChat_AcceptedLineDeletions : 14 ,
41+ InlineChat_DismissalEventCount : 15 ,
4242 InlineChat_DismissedLineAdditions : 16 ,
4343 InlineChat_DismissedLineDeletions : 17 ,
44- InlineChat_RejectedLineAdditions : 18 ,
45- InlineChat_RejectedLineDeletions : 19 ,
46- InlineChat_RejectionEventCount : 20 ,
47- InlineChat_TotalEventCount : 21 ,
48- Inline_AICodeLines : 22 ,
49- Inline_AcceptanceCount : 23 ,
50- Inline_SuggestionsCount : 24 ,
51-
44+ InlineChat_RejectedLineAdditions : 18 ,
45+ InlineChat_RejectedLineDeletions : 19 ,
46+ InlineChat_RejectionEventCount : 20 ,
47+ InlineChat_TotalEventCount : 21 ,
48+ Inline_AICodeLines : 22 ,
49+ Inline_AcceptanceCount : 23 ,
50+ Inline_SuggestionsCount : 24 ,
51+
5252 // Set values for new metrics
53- Chat_AICodeLines : 25 ,
54- Chat_MessagesInteracted : 26 ,
55- Chat_MessagesSent : 27 ,
56- CodeFix_AcceptanceEventCount : 28 ,
57- CodeFix_AcceptedLines : 29 ,
58- CodeFix_GeneratedLines : 30 ,
59- CodeFix_GenerationEventCount : 31 ,
60- CodeReview_FailedEventCount : 32 ,
61- Dev_AcceptanceEventCount : 33 ,
62- Dev_AcceptedLines : 34 ,
63- Dev_GeneratedLines : 35 ,
64- Dev_GenerationEventCount : 36 ,
65- DocGeneration_AcceptedFileUpdates : 37 ,
53+ Chat_AICodeLines : 25 ,
54+ Chat_MessagesInteracted : 26 ,
55+ Chat_MessagesSent : 27 ,
56+ CodeFix_AcceptanceEventCount : 28 ,
57+ CodeFix_AcceptedLines : 29 ,
58+ CodeFix_GeneratedLines : 30 ,
59+ CodeFix_GenerationEventCount : 31 ,
60+ CodeReview_FailedEventCount : 32 ,
61+ Dev_AcceptanceEventCount : 33 ,
62+ Dev_AcceptedLines : 34 ,
63+ Dev_GeneratedLines : 35 ,
64+ Dev_GenerationEventCount : 36 ,
65+ DocGeneration_AcceptedFileUpdates : 37 ,
6666 DocGeneration_AcceptedFilesCreations : 38 ,
67- DocGeneration_AcceptedLineAdditions : 39 ,
68- DocGeneration_AcceptedLineUpdates : 40 ,
69- DocGeneration_EventCount : 41 ,
70- DocGeneration_RejectedFileCreations : 42 ,
71- DocGeneration_RejectedFileUpdates : 43 ,
72- DocGeneration_RejectedLineAdditions : 44 ,
73- DocGeneration_RejectedLineUpdates : 45 ,
74- TestGeneration_AcceptedLines : 46 ,
75- TestGeneration_AcceptedTests : 47 ,
76- TestGeneration_EventCount : 48 ,
77- TestGeneration_GeneratedLines : 49 ,
78- TestGeneration_GeneratedTests : 50 ,
79- Transformation_EventCount : 51 ,
80- Transformation_LinesGenerated : 52 ,
81- Transformation_LinesIngested : 53 ,
67+ DocGeneration_AcceptedLineAdditions : 39 ,
68+ DocGeneration_AcceptedLineUpdates : 40 ,
69+ DocGeneration_EventCount : 41 ,
70+ DocGeneration_RejectedFileCreations : 42 ,
71+ DocGeneration_RejectedFileUpdates : 43 ,
72+ DocGeneration_RejectedLineAdditions : 44 ,
73+ DocGeneration_RejectedLineUpdates : 45 ,
74+ TestGeneration_AcceptedLines : 46 ,
75+ TestGeneration_AcceptedTests : 47 ,
76+ TestGeneration_EventCount : 48 ,
77+ TestGeneration_GeneratedLines : 49 ,
78+ TestGeneration_GeneratedTests : 50 ,
79+ Transformation_EventCount : 51 ,
80+ Transformation_LinesGenerated : 52 ,
81+ Transformation_LinesIngested : 53 ,
8282 }
83-
83+
8484 // Verify that all metrics are accessible
8585 // Existing metrics
8686 assert .Equal (t , 10 , userData .CodeReview_FindingsCount )
@@ -98,7 +98,7 @@ func TestQDevUserDataAllMetrics(t *testing.T) {
9898 assert .Equal (t , 22 , userData .Inline_AICodeLines )
9999 assert .Equal (t , 23 , userData .Inline_AcceptanceCount )
100100 assert .Equal (t , 24 , userData .Inline_SuggestionsCount )
101-
101+
102102 // New metrics
103103 assert .Equal (t , 25 , userData .Chat_AICodeLines )
104104 assert .Equal (t , 26 , userData .Chat_MessagesInteracted )
0 commit comments