public virtual void Execute(T[] expected) { //Compare the trees T root = this.Root(expected); _comparer.Compare(_currenttree, root, _handler); //On success, update our answer _currenttree = (T)root.Clone(); }
//Helpers public virtual void Verify(T actual, T expected) { _buffer = new StringBuilder(); //Diff the trees if (!_comparer.Compare(actual, expected, new NodeDiffHandler <T>(OnVerify))) { //Failed - output all differences throw new Exception("Verification Failed: \n" + _buffer.ToString() ); } //Passed System.Data.Test.Astoria.AstoriaTestLog.TraceLine("Verification Passed, no differences..."); }