private void AssertReportContainsScriptSource(string repxFileName, String expectedScriptSource)
 {
     var reader = new XtraReportScriptExtractor(new XtraReportLoader(new XtraReport(), repxFileName));
     string source = reader.ExtractScripts();
     var parser = new XtraReportScriptParser();
     if (parser.RemoveIgnoredSections(expectedScriptSource) != parser.RemoveIgnoredSections(source))
         throw new Exception("Expected scripts source does not match.");
 }
        public XtraReportScriptsPartFactory(XtraReportReader reader, UniqueIdentifierProvider uniqueIdentifierProvider)
        {
            if (reader == null)
                throw new ArgumentNullException("reader");
            if (uniqueIdentifierProvider == null)
                throw new ArgumentNullException("uniqueIdentifierProvider");

            Contents = reader.Contents;
            ScriptExtractor = new XtraReportScriptExtractor(new XtraReportLoader(new XtraReport(), reader.FullRepxFileName));

            NameSpace = uniqueIdentifierProvider.NameSpace;
            ClassName = uniqueIdentifierProvider.ClassName;
        }