Unit testing via BizUnit vs Visual Studio Test Method

Jul 28, 2014 at 10:51 PM
Edited Jul 28, 2014 at 10:55 PM

I am trying to do some unit testing for an Oracle auto-generated schema. I have written two methods, one using the BizUnit features and other one using default features available in Visual Studio Unit test project. The one that uses BizUnit dlls works fine and validate instance is successful where as the other one always fails. Is it something to do with the multiple root elements present in the autogenerated schema which only the BizUnit framework seems to understand ?

Following are the two simple test methods:

public void TestMethod_DefaultValidateOracleInputInstance()
PASH.Provider.Orchestrations.ProviderData.ProviderDataFromOracle_PK_APCD_DATA_PULL ins = new PASH.Provider.Orchestrations.ProviderData.ProviderDataFromOracle_PK_APCD_DATA_PULL {};

bool success = false;
success = ins.ValidateInstance(@"C:\APCD-Biztalk\PASH.Provider\TestFiles\Test.xml", Microsoft.BizTalk.TestTools.Schema.OutputInstanceType.XML);


public void TestMethod_BizUnitValidateOracleInputInstance()
var checkInputFile = new TestCase { Name = "Input file validation test" };

//Create a validating read step
//We should only have one file in the directory
var validatingFileReadStep = new FileReadMultipleStep
DirectoryPath = @"C:\APCD-Biztalk\PASH.Provider\TestFiles\BizUnitPollingFolder",
//SearchPattern = "{*}.xml",
SearchPattern = "ProviderOrchestrationStarter.xml",
ExpectedNumberOfFiles = 1,
Timeout = 4500,
//DeleteFiles = false

//Create an XML Validation step
//This will check the result against the XSD for the document

var validation = new XmlValidationStep();
var schemaSummary = new SchemaDefinition
XmlSchemaPath =
@"C:\BizTalk Projects\Testing\21st July Provider\PASH.Provider\PASH.Provider.Orchestrations.ProviderData\ProviderDataFromOracle_PK_APCD_DATA_PULL.xsd",
XmlSchemaNameSpace =


var bizUnit = new BizUnit.BizUnit(checkInputFile);

Jul 29, 2014 at 8:56 PM
Tried searching a bit on using BizUnit for doing a validate instance on Autogenerated schemas (especially with multiple roots). But no luck. Appreciate if some one can share some info on this.