File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ using System ;
2+ using System . Collections . Generic ;
3+ using Semmle . Extraction . CSharp . DependencyFetching ;
4+
5+ namespace Semmle . Extraction . Tests
6+ {
7+ internal class DotNetStub : IDotNet
8+ {
9+ private readonly IList < string > runtimes ;
10+ private readonly IList < string > sdks ;
11+
12+ public DotNetStub ( IList < string > runtimes , IList < string > sdks )
13+ {
14+ this . runtimes = runtimes ;
15+ this . sdks = sdks ;
16+ }
17+ public bool AddPackage ( string folder , string package ) => true ;
18+
19+ public bool New ( string folder ) => true ;
20+
21+ public RestoreResult Restore ( RestoreSettings restoreSettings ) => new ( true , Array . Empty < string > ( ) ) ;
22+
23+ public IList < string > GetListedRuntimes ( ) => runtimes ;
24+
25+ public IList < string > GetListedSdks ( ) => sdks ;
26+
27+ public bool Exec ( List < string > execArgs ) => true ;
28+
29+ public IList < string > GetNugetFeeds ( string nugetConfig ) => [ ] ;
30+
31+ public IList < string > GetNugetFeedsFromFolder ( string folderPath ) => [ ] ;
32+ }
33+ }
Original file line number Diff line number Diff line change 55
66namespace Semmle . Extraction . Tests
77{
8- internal class DotNetStub : IDotNet
9- {
10- private readonly IList < string > runtimes ;
11- private readonly IList < string > sdks ;
12-
13- public DotNetStub ( IList < string > runtimes , IList < string > sdks )
14- {
15- this . runtimes = runtimes ;
16- this . sdks = sdks ;
17- }
18- public bool AddPackage ( string folder , string package ) => true ;
19-
20- public bool New ( string folder ) => true ;
21-
22- public RestoreResult Restore ( RestoreSettings restoreSettings ) => new ( true , Array . Empty < string > ( ) ) ;
23-
24- public IList < string > GetListedRuntimes ( ) => runtimes ;
25-
26- public IList < string > GetListedSdks ( ) => sdks ;
27-
28- public bool Exec ( List < string > execArgs ) => true ;
29-
30- public IList < string > GetNugetFeeds ( string nugetConfig ) => [ ] ;
31-
32- public IList < string > GetNugetFeedsFromFolder ( string folderPath ) => [ ] ;
33- }
34-
358 public class RuntimeTests
369 {
3710 private static string FixExpectedPathOnWindows ( string path ) => path . Replace ( '\\ ' , '/' ) ;
You can’t perform that action at this time.
0 commit comments