BizUnit error Unit Test Adapter threw exception: Object must implement IConvertible..

Dec 16, 2015 at 2:59 PM
Hello All,

I have written a BizUnit test case and the files is getting processed and everything but my Unit test is failing with the error as

Unit Test Adapter threw exception:
Object must implement IConvertible..

My Test method code is :
public void Negative_oppoUsageRequest_HU()
        TestCase negative_oppoUsagetest_HU = new TestCase();
        negative_oppoUsagetest_HU.Name = "Negative_oppoUsagetest_HU_UnitTest";

        ////Delete files already present
        var filePathsToDelete = new Collection<string> { @"\\\EaiShare\UsageRequests\PPI.UsageRequest.CaptureHUResponseMessage_Msg\*.xml" };
        DeleteStep deleteFiles = new DeleteStep();
        deleteFiles.FilePathsToDelete = filePathsToDelete;

        ////Creating an instance of the sample file as input.
        var xdl = new BizUnit.TestSteps.DataLoaders.Xml.XmlDataLoader();
        xdl.FilePath = @"..\..\..\D.B2B.CNI.CRM.PPI.UsageRequest.UnitTests\Sample Files\oppo_HU_sample.xml";

        ////Calling the inbound WCF service
        var ws = new WebServiceStep();
        ws.Action = "SFDCWCFOperation";
        ws.FailOnError = false;
        ws.RequestBody = xdl;
        ws.ServiceUrl = "http://localhost/SFDCWCFService/SFDCIncomingWCFService.svc";

        ////Delay step has been added to keep the other services running while BizTalk sends them a request.
        BizUnit.TestSteps.Time.DelayStep delayResponse = new BizUnit.TestSteps.Time.DelayStep();
        delayResponse.DelayMilliSeconds = 40000;

        ////Create a validating read step
        ////We should only have 2 file in the directory
        var validatingHUResponseStep = new FileReadMultipleStep
            DirectoryPath = @"\\\EaiShare\UsageRequests\PPI.UsageRequest.CaptureHUResponseMessage_Msg",
            SearchPattern = "*.xml",
            ExpectedNumberOfFiles = 2,
            Timeout = 3000,
            DeleteFiles = false

        var validation = new XmlValidationStep();
        var schemaHUResponse = new SchemaDefinition
            XmlSchemaPath =
                @"..\..\..\D.B2B.CNI.CRM.PPI.UsageRequest.UnitTests\Sample Files\UnitTestCaseSchema.xsd",
            XmlSchemaNameSpace =

        ////Create an XPath Validation.  This will check a value in the output.
        ////The Xpath for the node can be grabbed from the Instance XPath property on the XSD.
        var checkValid = new BizUnit.TestSteps.Common.XPathDefinition
            Description = "Response",
            XPath =
            @"/*[local-name()='CreateEsgRequestResponse' and namespace-uri()='']/*[local-name()='CreateEsgRequestResult' and namespace-uri()='']",
            Value = "false"

        var bizunit = new BizUnit.BizUnit(negative_oppoUsagetest_HU);