public ProjectWrapper CreateTrainedObjDetectionProject() { #if RECORD_MODE var iteration = ProjectBuilderHelper.CreateTrainedObjDetectionProject(GetTrainingClient(), PredictionResourceId); this.fixture.TestToIterationMapping[HttpMockServer.TestIdentity] = iteration; return(new ProjectWrapper(iteration.ProjectId, iteration.Id)); #else return(new ProjectWrapper(this.fixture.TestToIterationMapping[HttpMockServer.TestIdentity].ProjectId, this.fixture.TestToIterationMapping[HttpMockServer.TestIdentity].Id)); #endif }
static BaseTests() { #if RECORD_MODE TrainingKey = ""; RecorderMode = HttpRecorderMode.Record; HttpMockServer.FileSystemUtilsObject = new FileSystemUtils(); var executingAssemblyPath = new Uri(typeof(BaseTests).GetTypeInfo().Assembly.CodeBase); HttpMockServer.RecordsDirectory = Path.Combine(Path.GetDirectoryName(executingAssemblyPath.AbsolutePath), @"..\..\..\SessionRecords"); // Clean up previous run of projects at the start of this test. var client = new CustomVisionTrainingClient() { ApiKey = TrainingKey, Endpoint = Endpoint }; ProjectBuilderHelper.CleanUpOldProjects(client); #endif }