public void Export_WagoXml_using_OutputPathWithoutFilename() { // Arrange Action <Options> prepareOptions = o => { var restClient = new StromlaufplanRestClient(o.Token); var projects = restClient.GetProjects(); o.WagoXml = true; o.OutputPath = Path.Combine(TestContext.TestRunResultsDirectory, TestContext.TestName, o.Token); o.Ids = projects.Select(x => x.id); }; Action <Options> verifyResult = o => { var resultFiles = Directory.EnumerateFiles(o.OutputPath).ToList(); resultFiles.Count.Should().BeGreaterThan(0); resultFiles.ForEach(x => Path.GetExtension(x).Should().Be(".xml")); }; // Act RunWithApiTokens(prepareOptions, verifyResult); // Assert }
public CommandBase(string token) { RestClient = new StromlaufplanRestClient(token); }