/// <summary>
        /// Check the source XML against the transformed candidate value.
        /// </summary>
        /// <param name="candidate">XElement to compare.</param>
        protected virtual void Check(XElement candidate)
        {
            if (string.IsNullOrEmpty(TargetFile))
            {
                Assert.Fail("No TargetFile specified");
            }

            if (string.IsNullOrEmpty(TargetSchema))
            {
                Assert.Fail("No TargetSchema specified");
            }

            if (string.IsNullOrEmpty(TargetVersion))
            {
                Assert.Fail("No TargetVersion specified");
            }

            var targetXml = GetXml(TargetFile, TargetSchema, TargetVersion);

            if (GenerateDiffFile)
            {
                if (!DiffFilePath.EndsWith("\\"))
                {
                    DiffFilePath += "\\";
                }
                var ext = Schema == TargetSchema ? Schema : Schema + TargetSchema;
                DiffFilePath = DiffFilePath + TargetFile.Substring(0, TargetFile.IndexOf(".", StringComparison.InvariantCultureIgnoreCase)) + "_" + ext + ".html";
            }
            else
            {
                DiffFilePath = string.Empty;
            }

            if (ValidateOutput)
            {
                SchemaValidate(targetXml, TargetSchema, TargetVersion);
            }

            CheckXml(targetXml, candidate);
        }