public void CanGetIndividualComponents() { SendPipelineWrapper pipeline = Pipelines.Xml.Send() .WithAssembler(Assembler.FlatFile()) .WithEncoder(new MIME_SMIME_Encoder()); Assert.IsAssignableFrom <XmlAsmComp>(pipeline.GetComponent(PipelineStage.Assemble, 0)); Assert.IsAssignableFrom <FFAsmComp>(pipeline.GetComponent(PipelineStage.Assemble, 1)); Assert.IsAssignableFrom <MIME_SMIME_Encoder>(pipeline.GetComponent(PipelineStage.Encode, 0)); }
public void CanGetIndividualComponents() { SendPipelineWrapper pipeline = Pipelines.Xml.Send() .WithAssembler(Assembler.FlatFile()) .WithEncoder(new MIME_SMIME_Encoder()); Assert.IsInstanceOfType(typeof(XmlAsmComp), pipeline.GetComponent(PipelineStage.Assemble, 0)); Assert.IsInstanceOfType(typeof(FFAsmComp), pipeline.GetComponent(PipelineStage.Assemble, 1)); Assert.IsInstanceOfType(typeof(MIME_SMIME_Encoder), pipeline.GetComponent(PipelineStage.Encode, 0)); }
public void CanApplyConfigToPipeline() { XmlTextReader reader = new XmlTextReader( DocLoader.LoadStream("PipelineInstanceConfig.xml") ); SendPipelineWrapper pipeline = Pipelines.Xml.Send() .WithAssembler(Assembler.Xml()) .WithEncoder(new MIME_SMIME_Encoder()) .WithInstanceConfig(reader); XmlAsmComp xmlassm = (XmlAsmComp) pipeline.GetComponent(PipelineStage.Assemble, 0); Assert.IsFalse(xmlassm.AddXMLDeclaration); Assert.IsFalse(xmlassm.PreserveBom); MIME_SMIME_Encoder enc = (MIME_SMIME_Encoder) pipeline.GetComponent(PipelineStage.Encode, 0); Assert.IsTrue(enc.EnableEncryption); Assert.AreEqual(MIME_SMIME_Encoder.MIMETransferEncodingType.SevenBit, enc.ContentTransferEncoding); }