///<summary> /// Used to deserialise a Xaml test case stored on disc into a TestCase ///</summary> ///<param name="filePath">The file path of the Xaml test case to deserialise.</param> ///<returns>The TestCase object</returns> public static TestCase LoadFromFile(string filePath) { string testCase; using (var fs = new FileStream(filePath, FileMode.Open, FileAccess.Read, FileShare.Read)) { var sr = new StreamReader(fs); testCase = sr.ReadToEnd(); } return((TestCase)BizUnitSerializationHelper.Deserialize(testCase)); }
///<summary> /// Used to deserialise a Xaml test case into a TestCase ///</summary> ///<param name="xamlTestCase">The Xaml test case</param> ///<returns>The TestCase object</returns> ///<exception cref="NotImplementedException"></exception> public static TestCase LoadXaml(string xamlTestCase) { return((TestCase)BizUnitSerializationHelper.Deserialize(xamlTestCase)); }