示例#1
0
        public override void Compute()
        {
            ImporterConfig config = (ImporterConfig)this.Configuration;

            if (config.Path == null)
            {
                throw new ComponentException("Path has not been specified.");
            }
            if (!File.Exists(config.Path))
            {
                throw new ComponentException(String.Format("File does not exist '{0}'.", config.Path.Absolute));
            }

            PoirotFormatArtifactsReader.Logger = this.Logger;
            TLArtifactsCollection targetArtifacts = PoirotFormatArtifactsReader.ReadXMLFile(config.Path, config.TrimElementValues);

            Workspace.Store("listOfArtifacts", targetArtifacts);

            Logger.Info("Artifacts has been imported from " + config.Path);
        }
 public void TestSetup()
 {
     TestConfig = new ImporterConfig();
 }