« Brian Harry on scaling TFS for DevDiv | Main | Decoding UTF-16 Messages with the BizTal... »
I've just now updated my Pipeline Testing Library. In this version, I've created my own mock IPipelineContext[Ex] implementation, to support configuring some functionality not previously available:
SendPipelineWrapper pipeline = PipelineFactory.CreateEmptySendPipeline();
pipeline.GroupSigningCertificate = "....";
The reason why I implemented the transactional support in the pipeline context mock object is that some components require it. In particular, it turns out that the BizTalk Framework Disassembler Component (BtfDasmComp) will not work unless the pipeline context returns a valid transaction from IPipelineContextEx.GetTransaction(). With this update, you can now test pipelines that use the BtfDasmComp component, though be aware that the transaction object is then used to access some of the biztalk databases (I'm not exactly sure yet what for, though). Here's an example piece of code with such a trick:
ReceivePipelineWrapper pipeline = PipelineFactory.CreateEmptyReceivePipeline();
pipeline.AddComponent(new BtfDasmComp(), PipelineStage.Disassemble);
FixEncodingComponent fix = new FixEncodingComponent();
fix.Encoding = Encoding.Unicode;
pipeline.AddComponent(fix, PipelineStage.Decode);
pipeline.EnableTransactions();
Stream input = new FileStream(@"e:\temp\BtfDasmTest\BOBUILDING_SITE2.xml", FileMode.Open);
IBaseMessage inputMsg = MessageHelper.CreateFromStream(input);
MessageCollection outputMsgs = pipeline.Execute(inputMsg);
Tomas Restrepo is a software developer located in Colombia, South America. His interests include .NET, Connected Systems, PowerShell and lately dynamic programming languages. More...
email: tomas@winterdom.com msn: tomasr@passport.com
Copyright © 2002-2008, Tomas Restrepo.
Powered by: newtelligence dasBlog 2.2.8279.16125