public static async Task <IEnumerable <CachingValidations> > ExecuteAsync(ICachingTest test, ICachingCommand command, INuGetExe nuGetExe, CachingType caching, ServerType server) { using (var testFolder = TestDirectory.Create()) using (var mockServer = new MockServer()) { var tc = new CachingTestContext(testFolder, mockServer, nuGetExe); // Enable this flag to launch the debugger when the nuget.exe process starts. This also increases // logging verbosity and command timeout. // // tc.Debug = true; tc.NoCache = caching.HasFlag(CachingType.NoCache); tc.DirectDownload = caching.HasFlag(CachingType.DirectDownload); tc.CurrentSource = server == ServerType.V2 ? tc.V2Source : tc.V3Source; tc.ClearHttpCache(); var validations = new List <CachingValidations>(); for (var i = 0; i < test.IterationCount; i++) { var args = await test.PrepareTestAsync(tc, command); var result = tc.Execute(args); validations.Add(test.Validate(tc, command, result)); } return(validations); } }
public ValuesController(ICachingTest cachingTest, ITestService testService) { _cachingTest = cachingTest; _testService = testService; }