Esempio n. 1
0
 /// <inheritdoc />
 public IEnumerable <TestRun> Get()
 {
     using (var streamReader = new StreamReader(this.stream))
     {
         return(new[] { TestRun.Load(streamReader) });
     }
 }
Esempio n. 2
0
 /// <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));
         }
     }
 }
Esempio n. 3
0
        /// <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));
                }
            }
        }
Esempio n. 4
0
        /// <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)
                    });
                }
            }
        }