Exemplo n.º 1
0
        public static void ModifyAndValidateException(TestActivity testActivity, Type exceptionType, string errorString)
        {
            string originalXaml = XamlTestDriver.Serialize(testActivity.ProductActivity);
            string modifiedXaml = testActivity.ModifyXamlDelegate(originalXaml);

            ExceptionHelpers.CheckForException(exceptionType, errorString, () => Deserialize(modifiedXaml));
        }
Exemplo n.º 2
0
 public static string Serialize(object obj)
 {
     using (MemoryStream xamlStream = new MemoryStream())
     {
         XamlTestDriver.Serialize(obj, xamlStream);
         xamlStream.Position = 0;
         return(XamlTestDriver.GetStringFromMemoryStream(xamlStream));
     }
 }