Exemplo n.º 1
0
        // <summary>
        // Compare two object trees. If all the descendant logical nodes
        // are equivalent, return true, otherwise, return false.
        // </summary>
        // <param name="firstTree">The root for the first tree.</param>
        // <param name="secondTree">The root for the second tree.</param>
        // <param name="fileName">Custom list of properties to ignore.</param>
        // <remarks>
        // Compares every event and property for each the node.
        // </remarks>
        // <returns>
        // A structure containing result. If the returned variable name is result.
        // result.Result is CompareResult.Equivalent in the case two nodes are equivalent,
        // and CompareResult.Different otherwise.
        // </returns>
        private static TreeComparerResult CompareLogical(
            Object firstTree,
            Object secondTree,
            string fileName)
        {
            Dictionary <string, PropertyToIgnore> props = TreeComparer.ReadSkipProperties(fileName);

            return(TreeComparer.CompareLogical(firstTree, secondTree, props));
        }
Exemplo n.º 2
0
 // <summary>
 // Read properties to skip from PropertiesToSkip.xml. If this file
 // exists under the current working directory, use the one there.
 // Otherwise, use the file built in the ClientTestLibrary Assembly.
 // </summary>
 // <returns>Hashtable containing properties should be skiped</returns>
 private static Dictionary <string, PropertyToIgnore> ReadSkipProperties()
 {
     // File name for the properties to skip.
     return(TreeComparer.ReadSkipProperties("PropertiesToSkip.xml"));
 }