/// <inheritdoc /> public IEnumerable <TestRun> Get() { using (var streamReader = new StreamReader(this.stream)) { return(new[] { TestRun.Load(streamReader) }); } }
/// <inheritdoc /> public IEnumerable <TestRun> Get() { string[] allfiles = Directory.GetFiles(directory, "*.json", SearchOption.AllDirectories); foreach (string file in allfiles) { using (var fileStream = File.OpenText(file)) { yield return(TestRun.Load(fileStream)); } } }
/// <inheritdoc /> public IEnumerable <TestRun> Get() { foreach (string file in Files) { if (!File.Exists(file)) { throw new TestRunException($"Cannot find file {file}."); } using (var fileStream = File.OpenText(file)) { yield return(TestRun.Load(fileStream)); } } }
/// <inheritdoc /> public override IEnumerable <object[]> GetData(MethodInfo testMethod) { var assembly = Assembly.GetExecutingAssembly(); using (var stream = assembly.GetManifestResourceStream($@"ZergRushCo.Todosya.Domain.IntegrationTests.{resource}")) { using (var streamReader = new StreamReader(stream)) { yield return(new object[] { TestRun.Load(streamReader) }); } } }