File tree Expand file tree Collapse file tree
ast-visual-studio-extension-tests/cx-unit-tests/cx-wrapper-tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44using System . Collections . Generic ;
55using System . Linq ;
66using Xunit ;
7+ using Xunit . Sdk ;
78
89namespace ast_visual_studio_extension_tests . cx_unit_tests . cx_wrapper_tests
910{
@@ -56,7 +57,8 @@ public void TestResultsStructure()
5657 Assert . True ( scanList . Any ( ) ) ;
5758 List < Scan > completedScans = scanList . Where ( scan => scan . Status . Equals ( "completed" , StringComparison . OrdinalIgnoreCase ) ) . ToList ( ) ;
5859
59- Results results = GetFirstScanWithResults ( completedScans ) . First ( ) . Value ;
60+ Dictionary < Scan , Results > scansWithResults = GetFirstScanWithResults ( completedScans ) ;
61+ Results results = scansWithResults . First ( ) . Value ;
6062
6163 Assert . Equal ( results . totalCount , results . results . Count ) ;
6264 }
Original file line number Diff line number Diff line change @@ -16,8 +16,10 @@ public void TestTriageShow()
1616 List < Scan > scanList = cxWrapper . GetScans ( "statuses=Completed" ) ;
1717 Assert . True ( scanList . Any ( ) ) ;
1818
19- Scan scan = GetFirstScanWithResults ( scanList ) . First ( ) . Key ;
20- Result result = GetFirstScanWithResults ( scanList ) . First ( ) . Value . results . Where ( r => r . Type . Equals ( "sast" ) ) . First ( ) ;
19+ Dictionary < Scan , Results > scansWithResults = GetFirstScanWithResults ( scanList ) ;
20+ KeyValuePair < Scan , Results > first = scansWithResults . First ( ) ;
21+ Scan scan = first . Key ;
22+ Result result = first . Value . results . Where ( r => r . Type . Equals ( "sast" ) ) . First ( ) ;
2123
2224 List < Predicate > predicates = cxWrapper . TriageShow ( scan . ProjectId , result . SimilarityId , result . Type ) ;
2325
@@ -30,8 +32,10 @@ public void TestTriageUpdate()
3032 List < Scan > scanList = cxWrapper . GetScans ( "statuses=Completed" ) ;
3133 Assert . True ( scanList . Count > 0 ) ;
3234
33- Scan scan = GetFirstScanWithResults ( scanList ) . First ( ) . Key ;
34- Result result = GetFirstScanWithResults ( scanList ) . First ( ) . Value . results . Where ( r => r . Type . Equals ( "sast" ) ) . First ( ) ;
35+ Dictionary < Scan , Results > scansWithResults = GetFirstScanWithResults ( scanList ) ;
36+ KeyValuePair < Scan , Results > first = scansWithResults . First ( ) ;
37+ Scan scan = first . Key ;
38+ Result result = first . Value . results . Where ( r => r . Type . Equals ( "sast" ) ) . First ( ) ;
3539
3640 try
3741 {
You can’t perform that action at this time.
0 commit comments