protected override TestResults CompileResults() { var serializer = new TheSerializer(); using (FileStream stream = File.OpenRead(Path.Combine(BaseDirectory, ResultFileName))) { return serializer.ToTypeof<TestResults>(stream); } }
protected override TestResults CompileResults() { var serializer = new TheSerializer(); using (FileStream stream = File.OpenRead(Path.Combine(BaseDirectory, ResultFileName))) { return(serializer.ToTypeof <TestResults>(stream)); } }
void SerializeResultsToFile(TestResults results) { var serializer = new TheSerializer(); string xml = serializer.ToXml(results); string solutionPath = Path.GetDirectoryName(_configuration.SolutionPath); string testFilePath = Path.Combine(solutionPath, "TestResult.xml"); File.WriteAllText(testFilePath, xml); }
MSpec LoadMSpecResults() { try { FileStream stream = File.OpenRead(Path.Combine(_currentdirectory, "mspecresults.xml")); var serializer = new TheSerializer(); var mspecResults = serializer.ToTypeof <MSpec>(stream); return(mspecResults); } catch (Exception e) { return(null); } }
MSpec LoadMSpecResults() { try { FileStream stream = File.OpenRead(Path.Combine(_currentdirectory, "mspecresults.xml")); var serializer = new TheSerializer(); var mspecResults = serializer.ToTypeof<MSpec>(stream); return mspecResults; } catch (Exception e) { return null; } }