public void SetUp(string name) { FileSource file = new FileSource(File.ReadAllBytes($"{name}.cs.testable"), ""); var generator = new TestsGenerator(); var t = generator.GetGenerator(file); t.Wait(); SyntaxTree syntaxTree = CSharpSyntaxTree.ParseText(Encoding.Default.GetString(t.Result.First().Data)); compilationUnitSyntax = syntaxTree.GetCompilationUnitRoot(); }
public async void StartTrhreadAsync() { IEnumerable <FileSource> tests; while (inputSet.Sem.WaitOne(timeout)) { FileSource source; inputSet.Queue.TryDequeue(out source); tests = await generator.GetGenerator(source); foreach (FileSource item in tests) { outputSet.Queue.Enqueue(item); outputSet.Sem.Release(); Console.WriteLine("Generated " + item.FileName); } } }