Example #1
0
 public static void SaveToFile(BizUnitTestCaseXaml testCase, string filePath)
 {
     using (FileStream fs = new FileStream(filePath, FileMode.CreateNew, FileAccess.ReadWrite, FileShare.None))
     {
         BizUnitSerializationHelper.Serialize(testCase, fs);
         fs.Flush();
     }
 }
Example #2
0
        public static BizUnitTestCaseXaml LoadFromFile(string filePath)
        {
            string testCase;

            using (FileStream fs = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.Read))
            {
                StreamReader sr = new StreamReader(fs);
                testCase = sr.ReadToEnd();
            }
            return((BizUnitTestCaseXaml)BizUnitSerializationHelper.Deserialize(testCase));
        }
Example #3
0
 public static string Save(BizUnitTestCaseXaml testCase)
 {
     return(BizUnitSerializationHelper.Serialize(testCase));
 }