예제 #1
0
        // ReSharper disable InconsistentNaming
        public void ServiceExecutionAbstract_ServiceExecutionAbstractUnitTest_CreateService_ResourceCatalogRetrievesBothResources()
        // ReSharper restore InconsistentNaming
        {
            //init
            var databaseService     = new MockServiceExecutionAbstract <DbService, DbSource>(new DsfDataObject("<DataList></DataList>", Guid.NewGuid()), It.IsAny <bool>());
            var mockResourceCatalog = new Mock <ResourceCatalog>(It.IsAny <IEnumerable <DynamicService> >());

            mockResourceCatalog.Setup(c => c.GetResource <DbService>(It.IsAny <Guid>(), It.IsAny <Guid>())).Verifiable();
            mockResourceCatalog.Setup(c => c.GetResource <DbService>(It.IsAny <Guid>(), It.IsAny <Guid>())).Returns(new DbService());
            mockResourceCatalog.Setup(c => c.GetResource <DbSource>(It.IsAny <Guid>(), It.IsAny <Guid>())).Verifiable();
            mockResourceCatalog.Setup(c => c.GetResource <DbSource>(It.IsAny <Guid>(), It.IsAny <Guid>())).Returns(new DbSource());

            //exe
            databaseService.MockCreateService(mockResourceCatalog.Object);

            //assert
            mockResourceCatalog.Verify(c => c.GetResource <DbService>(It.IsAny <Guid>(), It.IsAny <Guid>()), Times.Once());
            mockResourceCatalog.Verify(c => c.GetResource <DbSource>(It.IsAny <Guid>(), It.IsAny <Guid>()), Times.Once());
        }
        // ReSharper disable InconsistentNaming
        public void ServiceExecutionAbstract_ExecuteWithCrazyXML_ShouldMap()
        // ReSharper restore InconsistentNaming
        {
            //init
            
            var mockResourceCatalog = new Mock<ResourceCatalog>(It.IsAny<IEnumerable<DynamicService>>());
            mockResourceCatalog.Setup(c => c.GetResource<WebService>(It.IsAny<Guid>(), It.IsAny<Guid>())).Verifiable();
            const string Xml = "<Service ID=\"489a3611-523c-40ce-a13d-3fc32b857cdc\" Name=\"CEWBSUpdateCommsRequest\" ResourceType=\"WebService\" IsValid=\"false\" ServerVersion=\"0.4.5578.26820\" ServerID=\"1d9aa0ae-4ecd-4c7d-b1d1-30fe5a714600\">" +
                               "<Actions>" +
                               "<Action Name=\"CEWBSUpdateCommsRequest\" Type=\"InvokeWebService\" SourceID=\"6ee209c8-04ca-4da7-a2ae-83822a738c82\" SourceName=\"SRVUpdateCommReq\" ExecuteAction=\"\" SourceMethod=\"\" RequestUrl=\"/api/CommsEngine/UpdateCommunicationRequest?CommunicationRequestID=[[CommunicationRequestID]]&amp;Result=[[Result]]&amp;Reason=[[Reason]]&amp;ScheduledFor=[[ScheduledFor]]\" RequestMethod=\"Get\" JsonPath=\"\">" +
                               "<RequestHeaders><![CDATA[Content-type: application/xml MerchantUserName: User180315 MerchantPassword: 465FDB04-EC2F-421D-9ACF-88274285F84B MerchantPublicKey: 8CE86EE7-A303-4900-90B5-C2DADCC1A931]]></RequestHeaders>" +
                               "<RequestBody><![CDATA[]]></RequestBody>" +
                               "<Inputs>" +                              
                               "</Inputs>" +
                               "<Outputs>" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsException:nil\" Name=\"Exception\" MapsTo=\"Exception\" Value=\"[[Exception]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsMessage:nil\" Name=\"Message\" MapsTo=\"Message\" Value=\"[[Message]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsResponseDate\" Name=\"ResponseDate\" MapsTo=\"ResponseDate\" Value=\"[[ResponseDate]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsResult\" Name=\"Result\" MapsTo=\"Result\" Value=\"[[Result]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsStatusCode\" Name=\"StatusCode\" MapsTo=\"StatusCode\" Value=\"[[StatusCode]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsCommsEngineCommunicationAdded:nil\" Name=\"Added\" MapsTo=\"Added\" Value=\"[[Added]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsCommsEngineCommunicationToSend:nil\" Name=\"ToSend\" MapsTo=\"ToSend\" Value=\"[[ToSend]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsCommsEngineCommunicationToUpdateCommsEngineCommunicationToUpdateCommunicationRequestID\" Name=\"UpateCommunicationRequestID\" MapsTo=\"UpateCommunicationRequestID\" Value=\"[[UpateCommunicationRequestID]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsCommsEngineCommunicationToUpdateCommsEngineCommunicationToUpdateOperationStatus\" Name=\"OperationStatus\" MapsTo=\"OperationStatus\" Value=\"[[OperationStatus]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsCommsEngineCommunicationToUpdateCommsEngineCommunicationToUpdateReason:nil\" Name=\"UpdateReason\" MapsTo=\"UpdateReason\" Value=\"[[UpdateReason]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsCommsEngineCommunicationToUpdateCommsEngineCommunicationToUpdateResult\" Name=\"Result\" MapsTo=\"Result\" Value=\"[[Result]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsCommsEngineCommunicationToUpdateCommsEngineCommunicationToUpdateScheduledFor\" Name=\"ScheduledFor\" MapsTo=\"ScheduledFor\" Value=\"[[ScheduledFor]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsCommsEngineCommunicationToView:nil\" Name=\"View\" MapsTo=\"View\" Value=\"[[View]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "</Outputs>" +
                               "<OutputDescription><![CDATA[<z:anyType xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:d1p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.Ouput\" i:type=\"d1p1:OutputDescription\" xmlns:z=\"http://schemas.microsoft.com/2003/10/Serialization/\"><d1p1:DataSourceShapes xmlns:d2p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"><d2p1:anyType i:type=\"d1p1:DataSourceShape\"><d1p1:_x003C_Paths_x003E_k__BackingField><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.Exception:nil</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.Exception:nil</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[Exception]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">true</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.Message:nil</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.Message:nil</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[Message]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">true</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.ResponseDate</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.ResponseDate</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[ResponseDate]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">2015/04/30 02:02:11 PM</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.Result</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.Result</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[Result]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">OK</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.StatusCode</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.StatusCode</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[StatusCode]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Success</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationAdded:nil</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationAdded:nil</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[Added]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">true</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToSend:nil</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToSend:nil</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[ToSend]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">true</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.CommunicationRequestID</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.CommunicationRequestID</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[UpateCommunicationRequestID]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">86d02dff-08ef-e411-a221-0018fefdef3a</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.OperationStatus</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.OperationStatus</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[OperationStatus]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Success</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.Reason:nil</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.Reason:nil</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[UpdateReason]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">true</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.Result</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.Result</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[Result]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Sent</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.ScheduledFor</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.ScheduledFor</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[ScheduledFor]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">2015-04-30T14:01:01</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToView:nil</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToView:nil</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[View]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">true</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType></d1p1:_x003C_Paths_x003E_k__BackingField></d2p1:anyType></d1p1:DataSourceShapes><d1p1:Format>ShapedXML</d1p1:Format></z:anyType>]]></OutputDescription>" +
                               "</Action>" +
                               "</Actions>" +
                               "<TypeOf>InvokeWebService</TypeOf>" +
                               "<DisplayName>CEWBSUpdateCommsRequest</DisplayName>" +
                               "<Category>Communications\\Services\\CEWBSUpdateCommsRequest</Category>" +
                               "<VersionInfo DateTimeStamp=\"2015-04-30T14:06:56.2341245+02:00\" Reason=\"\" User=\"\" VersionNumber=\"16\" ResourceId=\"489a3611-523c-40ce-a13d-3fc32b857cdc\" VersionId=\"63895bba-05d2-414b-a4bb-bd189c793a2d\" />  " +
                               "</Service>";
            var xelement = XElement.Parse(Xml);
            var webService = new WebService(xelement);
            mockResourceCatalog.Setup(c => c.GetResource<WebService>(It.IsAny<Guid>(), It.IsAny<Guid>())).Returns(webService);
            mockResourceCatalog.Setup(c => c.GetResource<WebSource>(It.IsAny<Guid>(), It.IsAny<Guid>())).Verifiable();
            mockResourceCatalog.Setup(c => c.GetResource<WebSource>(It.IsAny<Guid>(), It.IsAny<Guid>())).Returns(new WebSource());
            var webServiceMock = new MockServiceExecutionAbstract<WebService, WebSource>(new DsfDataObject("<DataList></DataList>", Guid.NewGuid()), It.IsAny<bool>());
            webServiceMock.Service = webService;
            webServiceMock.ReturnFromExecute = "<CommsEngineResponseViewModels xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.datacontract.org/2004/07/TU.Genisys2.CEWBS.ViewModels.Response.CommsEngine\">" +
                                               "<Exception xmlns:d2p1=\"http://schemas.datacontract.org/2004/07/System\" i:nil=\"true\" xmlns=\"http://schemas.datacontract.org/2004/07/TU.Genisys2.CEWBS.ViewModels.Response\" />" +
                                               "<Message i:nil=\"true\" xmlns=\"http://schemas.datacontract.org/2004/07/TU.Genisys2.CEWBS.ViewModels.Response\" />" +
                                               "<ResponseDate xmlns=\"http://schemas.datacontract.org/2004/07/TU.Genisys2.CEWBS.ViewModels.Response\">2015/05/06 02:07:02 PM</ResponseDate>" +
                                               "<Result xmlns=\"http://schemas.datacontract.org/2004/07/TU.Genisys2.CEWBS.ViewModels.Response\">OK</Result>" +
                                               "<StatusCode xmlns=\"http://schemas.datacontract.org/2004/07/TU.Genisys2.CEWBS.ViewModels.Response\">Success</StatusCode>" +
                                               "<CommsEngineCommunicationAdded i:nil=\"true\" />" +
                                               "<CommsEngineCommunicationToSend i:nil=\"true\" />" +
                                               "<CommsEngineCommunicationToUpdate>" +
                                               "<CommsEngineCommunicationToUpdate>" +
                                               "<CommunicationRequestID>dee2c3d6-e6f3-e411-a221-0018fefdef3a</CommunicationRequestID>" +
                                               "<OperationStatus>Success</OperationStatus>" +
                                               "<Reason i:nil=\"true\" />" +
                                               "<Result>Sent</Result>" +
                                               "<ScheduledFor>2015-05-06T14:08:00</ScheduledFor>" +
                                               "</CommsEngineCommunicationToUpdate>" +
                                               "</CommsEngineCommunicationToUpdate>" +
                                               "<CommsEngineCommunicationToView i:nil=\"true\" />" +
                                               "</CommsEngineResponseViewModels>";
            //exe
            ErrorResultTO errors;
            webServiceMock.MockExecuteImpl(null,out errors);
            Assert.IsFalse(errors.HasErrors(),"Error while parsing crazy xml");

            //assert
        }
 public void ServiceExecutionAbstract_Execute_ObjectJson_ShouldMapCorrectly()
 {
     //------------Setup for test--------------------------
     var mockResourceCatalog = new Mock<ResourceCatalog>(It.IsAny<IEnumerable<DynamicService>>());
     mockResourceCatalog.Setup(c => c.GetResource<WebService>(It.IsAny<Guid>(), It.IsAny<Guid>())).Verifiable();
     const string Xml = "<Service ID=\"a6c54514-48b5-4c1c-ab48-aac8f692140a\" Name=\"JsonObjectService\" ResourceType=\"WebService\" IsValid=\"false\" ServerVersion=\"0.5.5632.17512\" ServerID=\"51a58300-7e9d-4927-a57b-e5d700b11b55\">" +
                        "<Actions>" +
                        "<Action Name=\"JsonObjectService\" Type=\"InvokeWebService\" SourceID=\"1eaf69f4-e734-46b5-a5ee-5245b971f85e\" SourceName=\"ThreePeaksWebSource\" ExecuteAction=\"\" SourceMethod=\"\" RequestUrl=\"\" RequestMethod=\"Get\" JsonPath=\"\">" +
                        "<RequestHeaders><![CDATA[]]></RequestHeaders>" +
                        "<RequestBody><![CDATA[]]></RequestBody>" +
                        "<Inputs />" +
                        "<Outputs>" +
                        "<Output OriginalName=\"CommsEngineCommunicationToUpdate\" Name=\"CommsEngineCommunicationToUpdate\" MapsTo=\"CommsEngineCommunicationToUpdate\" Value=\"[[CommsEngineCommunicationToUpdate]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                        "<Output OriginalName=\"CommsEngineCommunicationAdded\" Name=\"CommsEngineCommunicationAdded\" MapsTo=\"CommsEngineCommunicationAdded\" Value=\"[[CommsEngineCommunicationAdded]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                        "<Output OriginalName=\"CommsEngineCommunicationToView\" Name=\"CommsEngineCommunicationToView\" MapsTo=\"CommsEngineCommunicationToView\" Value=\"[[CommsEngineCommunicationToView]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                        "<Output OriginalName=\"StatusCode\" Name=\"StatusCode\" MapsTo=\"StatusCode\" Value=\"[[StatusCode]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                        "<Output OriginalName=\"Message\" Name=\"Message\" MapsTo=\"Message\" Value=\"[[Message]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                        "<Output OriginalName=\"Exception\" Name=\"Exception\" MapsTo=\"Exception\" Value=\"[[Exception]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                        "<Output OriginalName=\"Result\" Name=\"Result\" MapsTo=\"Result\" Value=\"[[Result]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                        "<Output OriginalName=\"ResponseDate\" Name=\"ResponseDate\" MapsTo=\"ResponseDate\" Value=\"[[ResponseDate]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                        "<Output OriginalName=\"CommunicationRequestID\" Name=\"CommunicationRequestID\" MapsTo=\"CommunicationRequestID\" Value=\"[[CommsEngineCommunicationToSend().CommunicationRequestID]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"PolicyNo\" Name=\"PolicyNo\" MapsTo=\"PolicyNo\" Value=\"[[CommsEngineCommunicationToSend().PolicyNo]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"EventType\" Name=\"EventType\" MapsTo=\"EventType\" Value=\"[[CommsEngineCommunicationToSend().EventType]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"EventSource\" Name=\"EventSource\" MapsTo=\"EventSource\" Value=\"[[CommsEngineCommunicationToSend().EventSource]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"MessageContent\" Name=\"MessageContent\" MapsTo=\"MessageContent\" Value=\"[[CommsEngineCommunicationToSend().MessageContent]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"DeliveryAddress\" Name=\"DeliveryAddress\" MapsTo=\"DeliveryAddress\" Value=\"[[CommsEngineCommunicationToSend().DeliveryAddress]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"OriginalAddress\" Name=\"OriginalAddress\" MapsTo=\"OriginalAddress\" Value=\"[[CommsEngineCommunicationToSend().OriginalAddress]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"ScheduledFor\" Name=\"ScheduledFor\" MapsTo=\"ScheduledFor\" Value=\"[[CommsEngineCommunicationToSend().ScheduledFor]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"CommunicationsProfile\" Name=\"CommunicationsProfile\" MapsTo=\"CommunicationsProfile\" Value=\"[[CommsEngineCommunicationToSend().CommunicationsProfile]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"CommunicationType\" Name=\"CommunicationType\" MapsTo=\"CommunicationType\" Value=\"[[CommsEngineCommunicationToSend().CommunicationType]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"Subject\" Name=\"Subject\" MapsTo=\"Subject\" Value=\"[[CommsEngineCommunicationToSend().Subject]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"Attachments\" Name=\"Attachments\" MapsTo=\"Attachments\" Value=\"[[CommsEngineCommunicationToSend().Attachments]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"HTML\" Name=\"HTML\" MapsTo=\"HTML\" Value=\"[[CommsEngineCommunicationToSend().HTML]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"AttemptCount\" Name=\"AttemptCount\" MapsTo=\"AttemptCount\" Value=\"[[CommsEngineCommunicationToSend().AttemptCount]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"Priority\" Name=\"Priority\" MapsTo=\"Priority\" Value=\"[[CommsEngineCommunicationToSend().Priority]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "<Output OriginalName=\"MetaData\" Name=\"MetaData\" MapsTo=\"MetaData\" Value=\"[[CommsEngineCommunicationToSend().MetaData]]\" RecordsetName=\"CommsEngineCommunicationToSend\" RecordsetAlias=\"CommsEngineCommunicationToSend\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                        "</Outputs>" +
                        "<OutputDescription><![CDATA[<z:anyType xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:d1p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.Ouput\" i:type=\"d1p1:OutputDescription\" xmlns:z=\"http://schemas.microsoft.com/2003/10/Serialization/\"><d1p1:DataSourceShapes xmlns:d2p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"><d2p1:anyType i:type=\"d1p1:DataSourceShape\"><d1p1:_x003C_Paths_x003E_k__BackingField><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToUpdate</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToUpdate</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToUpdate]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\" /></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationAdded</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationAdded</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationAdded]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\" /></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToView</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToView</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToView]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\" /></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">StatusCode</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">StatusCode</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[StatusCode]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">1</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Message</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Message</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[Message]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\" /></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Exception</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Exception</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[Exception]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\" /></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Result</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Result</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[Result]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">OK</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">ResponseDate</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">ResponseDate</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[ResponseDate]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">2015/06/02 09:58:20 AM</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().CommunicationRequestID</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().CommunicationRequestID</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().CommunicationRequestID]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">60d47fa8-f208-e511-a221-0018fefdef3a</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().PolicyNo</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().PolicyNo</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().PolicyNo]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">AA1001366</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().EventType</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().EventType</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().EventType]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">DebitFailed</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().EventSource</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().EventSource</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().EventSource]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Collections</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().MessageContent</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().MessageContent</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().MessageContent]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Hi there!  Your  debit order didn't go through this month. Please give us a shout on 087 357 6529 so we can make sure we've got your details right. Love__COMMA__ The Unlimited</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().DeliveryAddress</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().DeliveryAddress</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().DeliveryAddress]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">0825688436</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().OriginalAddress</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().OriginalAddress</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().OriginalAddress]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">sample string 10</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().ScheduledFor</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().ScheduledFor</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().ScheduledFor]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">2015/05/27 03:30:02 PM</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().CommunicationsProfile</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().CommunicationsProfile</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().CommunicationsProfile]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">sample string 12</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().CommunicationType</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().CommunicationType</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().CommunicationType]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">SMS</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().Subject</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().Subject</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().Subject]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Default Subject</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().Attachments</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().Attachments</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().Attachments]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\" /></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().HTML</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().HTML</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().HTML]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\" /></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().AttemptCount</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().AttemptCount</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().AttemptCount]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\" /></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().Priority</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().Priority</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().Priority]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">1</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Json\" i:type=\"d5p1:JsonPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().MetaData</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineCommunicationToSend().MetaData</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[CommsEngineCommunicationToSend().MetaData]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">sample string 15</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType></d1p1:_x003C_Paths_x003E_k__BackingField></d2p1:anyType></d1p1:DataSourceShapes><d1p1:Format>ShapedXML</d1p1:Format></z:anyType>]]></OutputDescription>" +
                        "</Action>" +
                        "</Actions>" +
                        "<TypeOf>InvokeWebService</TypeOf>" +
                        "<DisplayName>JsonObjectService</DisplayName>" +
                        "<Category>JsonObjectService</Category>" +
                        "<VersionInfo DateTimeStamp=\"2015-06-03T10:00:27.8584191+02:00\" Reason=\"Save\" User=\"Unknown\" VersionNumber=\"1\" ResourceId=\"a6c54514-48b5-4c1c-ab48-aac8f692140a\" VersionId=\"7ca42a4e-d08f-40fd-92b5-31bff77394de\" />" +
                        "</Service>";
     var xelement = XElement.Parse(Xml);
     var webService = new WebService(xelement);
     mockResourceCatalog.Setup(c => c.GetResource<WebService>(It.IsAny<Guid>(), It.IsAny<Guid>())).Returns(webService);
     mockResourceCatalog.Setup(c => c.GetResource<WebSource>(It.IsAny<Guid>(), It.IsAny<Guid>())).Verifiable();
     mockResourceCatalog.Setup(c => c.GetResource<WebSource>(It.IsAny<Guid>(), It.IsAny<Guid>())).Returns(new WebSource());
     var webServiceMock = new MockServiceExecutionAbstract<WebService, WebSource>(new DsfDataObject("<DataList></DataList>", Guid.NewGuid()));
     webServiceMock.Service = webService;
     webServiceMock.InstanceOutputDefintions = "<Outputs>" +
                                               "<Output Name=\"CommsEngineCommunicationToUpdate\" MapsTo=\"[[CommsEngineCommunicationToUpdate]]\" Value=\"[[CommsEngineCommunicationToUpdate]]\" />" +
                                               "<Output Name=\"CommsEngineCommunicationAdded\" MapsTo=\"[[CommsEngineCommunicationAdded]]\" Value=\"[[CommsEngineCommunicationAdded]]\" />" +
                                               "<Output Name=\"CommsEngineCommunicationToView\" MapsTo=\"[[CommsEngineCommunicationToView]]\" Value=\"[[CommsEngineCommunicationToView]]\" />" +
                                               "<Output Name=\"StatusCode\" MapsTo=\"[[StatusCode]]\" Value=\"[[StatusCode]]\" />" +
                                               "<Output Name=\"Message\" MapsTo=\"[[Message]]\" Value=\"[[Message]]\" />" +
                                               "<Output Name=\"Exception\" MapsTo=\"[[Exception]]\" Value=\"[[Exception]]\" />" +
                                               "<Output Name=\"Result\" MapsTo=\"[[Result]]\" Value=\"[[Result]]\" />" +
                                               "<Output Name=\"ResponseDate\" MapsTo=\"[[ResponseDate]]\" Value=\"[[ResponseDate]]\" />" +
                                               "<Output Name=\"CommunicationRequestID\" MapsTo=\"[[CommunicationRequestID]]\" Value=\"[[CommsEngineCommunicationToSend().CommunicationRequestID]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"PolicyNo\" MapsTo=\"[[PolicyNo]]\" Value=\"[[CommsEngineCommunicationToSend().PolicyNo]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"EventType\" MapsTo=\"[[EventType]]\" Value=\"[[CommsEngineCommunicationToSend().EventType]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"EventSource\" MapsTo=\"[[EventSource]]\" Value=\"[[CommsEngineCommunicationToSend().EventSource]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"MessageContent\" MapsTo=\"[[MessageContent]]\" Value=\"[[CommsEngineCommunicationToSend().MessageContent]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"DeliveryAddress\" MapsTo=\"[[DeliveryAddress]]\" Value=\"[[CommsEngineCommunicationToSend().DeliveryAddress]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"OriginalAddress\" MapsTo=\"[[OriginalAddress]]\" Value=\"[[CommsEngineCommunicationToSend().OriginalAddress]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"ScheduledFor\" MapsTo=\"[[ScheduledFor]]\" Value=\"[[CommsEngineCommunicationToSend().ScheduledFor]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"CommunicationsProfile\" MapsTo=\"[[CommunicationsProfile]]\" Value=\"[[CommsEngineCommunicationToSend().CommunicationsProfile]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"CommunicationType\" MapsTo=\"[[CommunicationType]]\" Value=\"[[CommsEngineCommunicationToSend().CommunicationType]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"Subject\" MapsTo=\"[[Subject]]\" Value=\"[[CommsEngineCommunicationToSend().Subject]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"Attachments\" MapsTo=\"[[Attachments]]\" Value=\"[[CommsEngineCommunicationToSend().Attachments]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"HTML\" MapsTo=\"[[HTML]]\" Value=\"[[CommsEngineCommunicationToSend().HTML]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"AttemptCount\" MapsTo=\"[[AttemptCount]]\" Value=\"[[CommsEngineCommunicationToSend().AttemptCount]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"Priority\" MapsTo=\"[[Priority]]\" Value=\"[[CommsEngineCommunicationToSend().Priority]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "<Output Name=\"MetaData\" MapsTo=\"[[MetaData]]\" Value=\"[[CommsEngineCommunicationToSend().MetaData]]\" Recordset=\"CommsEngineCommunicationToSend\" />" +
                                               "</Outputs>";
     webServiceMock.ReturnFromExecute = "{\"CommsEngineCommunicationToUpdate\":null,\"CommsEngineCommunicationToSend\":[{\"CommunicationRequestID\":\"60d47fa8-f208-e511-a221-0018fefdef3a\",\"PolicyNo\":\"AA1001366\",\"EventType\":\"DebitFailed\",\"EventSource\":\"Collections\",\"MessageContent\":\"Hi there!  Your  debit order didn't go through this month. Please give us a shout on 087 357 6529 so we can make sure we've got your details right. Love, The Unlimited\",\"DeliveryAddress\":\"0825688436\",\"OriginalAddress\":\"sample string 10\",\"ScheduledFor\":\"2015-05-27T15:30:02\",\"CommunicationsProfile\":\"sample string 12\",\"CommunicationType\":\"SMS\",\"Subject\":\"Default Subject\",\"Attachments\":\"\",\"HTML\":null,\"AttemptCount\":null,\"Priority\":1,\"MetaData\":\"sample string 15\"}],\"CommsEngineCommunicationAdded\":null,\"CommsEngineCommunicationToView\":null,\"StatusCode\":1,\"Message\":null,\"Exception\":null,\"Result\":\"OK\",\"ResponseDate\":\"2015/06/02 09:58:20 AM\"}";
     //------------Execute Test---------------------------
     ErrorResultTO errors;
     webServiceMock.MockExecuteImpl(out errors);
     //------------Assert Results-------------------------
     Assert.IsFalse(errors.HasErrors(), "Error while parsing object json");
     var warewolfEvalResult = webServiceMock.DataObj.Environment.Eval("[[CommsEngineCommunicationToSend().MessageContent]]",0) as WarewolfDataEvaluationCommon.WarewolfEvalResult.WarewolfAtomListresult;
     Assert.IsNotNull(warewolfEvalResult);
     var actual = warewolfEvalResult.Item[0].ToString();
     Assert.AreEqual("Hi there!  Your  debit order didn't go through this month. Please give us a shout on 087 357 6529 so we can make sure we've got your details right. Love, The Unlimited",actual);
 }
예제 #4
0
        // ReSharper disable InconsistentNaming
        public void ServiceExecutionAbstract_ExecuteWithCrazyXML_ShouldMap()
        // ReSharper restore InconsistentNaming
        {
            //init

            var mockResourceCatalog = new Mock <ResourceCatalog>(It.IsAny <IEnumerable <DynamicService> >());

            mockResourceCatalog.Setup(c => c.GetResource <WebService>(It.IsAny <Guid>(), It.IsAny <Guid>())).Verifiable();
            const string Xml = "<Service ID=\"489a3611-523c-40ce-a13d-3fc32b857cdc\" Name=\"CEWBSUpdateCommsRequest\" ResourceType=\"WebService\" IsValid=\"false\" ServerVersion=\"0.4.5578.26820\" ServerID=\"1d9aa0ae-4ecd-4c7d-b1d1-30fe5a714600\">" +
                               "<Actions>" +
                               "<Action Name=\"CEWBSUpdateCommsRequest\" Type=\"InvokeWebService\" SourceID=\"6ee209c8-04ca-4da7-a2ae-83822a738c82\" SourceName=\"SRVUpdateCommReq\" ExecuteAction=\"\" SourceMethod=\"\" RequestUrl=\"/api/CommsEngine/UpdateCommunicationRequest?CommunicationRequestID=[[CommunicationRequestID]]&amp;Result=[[Result]]&amp;Reason=[[Reason]]&amp;ScheduledFor=[[ScheduledFor]]\" RequestMethod=\"Get\" JsonPath=\"\">" +
                               "<RequestHeaders><![CDATA[Content-type: application/xml MerchantUserName: User180315 MerchantPassword: 465FDB04-EC2F-421D-9ACF-88274285F84B MerchantPublicKey: 8CE86EE7-A303-4900-90B5-C2DADCC1A931]]></RequestHeaders>" +
                               "<RequestBody><![CDATA[]]></RequestBody>" +
                               "<Inputs>" +
                               "</Inputs>" +
                               "<Outputs>" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsException:nil\" Name=\"Exception\" MapsTo=\"Exception\" Value=\"[[Exception]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsMessage:nil\" Name=\"Message\" MapsTo=\"Message\" Value=\"[[Message]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsResponseDate\" Name=\"ResponseDate\" MapsTo=\"ResponseDate\" Value=\"[[ResponseDate]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsResult\" Name=\"Result\" MapsTo=\"Result\" Value=\"[[Result]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsStatusCode\" Name=\"StatusCode\" MapsTo=\"StatusCode\" Value=\"[[StatusCode]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsCommsEngineCommunicationAdded:nil\" Name=\"Added\" MapsTo=\"Added\" Value=\"[[Added]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsCommsEngineCommunicationToSend:nil\" Name=\"ToSend\" MapsTo=\"ToSend\" Value=\"[[ToSend]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsCommsEngineCommunicationToUpdateCommsEngineCommunicationToUpdateCommunicationRequestID\" Name=\"UpateCommunicationRequestID\" MapsTo=\"UpateCommunicationRequestID\" Value=\"[[UpateCommunicationRequestID]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsCommsEngineCommunicationToUpdateCommsEngineCommunicationToUpdateOperationStatus\" Name=\"OperationStatus\" MapsTo=\"OperationStatus\" Value=\"[[OperationStatus]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsCommsEngineCommunicationToUpdateCommsEngineCommunicationToUpdateReason:nil\" Name=\"UpdateReason\" MapsTo=\"UpdateReason\" Value=\"[[UpdateReason]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsCommsEngineCommunicationToUpdateCommsEngineCommunicationToUpdateResult\" Name=\"Result\" MapsTo=\"Result\" Value=\"[[Result]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsCommsEngineCommunicationToUpdateCommsEngineCommunicationToUpdateScheduledFor\" Name=\"ScheduledFor\" MapsTo=\"ScheduledFor\" Value=\"[[ScheduledFor]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "<Output OriginalName=\"CommsEngineResponseViewModelsCommsEngineCommunicationToView:nil\" Name=\"View\" MapsTo=\"View\" Value=\"[[View]]\" RecordsetName=\"\" RecordsetAlias=\"\" Recordset=\"\" />" +
                               "</Outputs>" +
                               "<OutputDescription><![CDATA[<z:anyType xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:d1p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.Ouput\" i:type=\"d1p1:OutputDescription\" xmlns:z=\"http://schemas.microsoft.com/2003/10/Serialization/\"><d1p1:DataSourceShapes xmlns:d2p1=\"http://schemas.microsoft.com/2003/10/Serialization/Arrays\"><d2p1:anyType i:type=\"d1p1:DataSourceShape\"><d1p1:_x003C_Paths_x003E_k__BackingField><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.Exception:nil</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.Exception:nil</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[Exception]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">true</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.Message:nil</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.Message:nil</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[Message]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">true</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.ResponseDate</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.ResponseDate</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[ResponseDate]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">2015/04/30 02:02:11 PM</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.Result</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.Result</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[Result]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">OK</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.StatusCode</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.StatusCode</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[StatusCode]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Success</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationAdded:nil</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationAdded:nil</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[Added]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">true</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToSend:nil</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToSend:nil</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[ToSend]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">true</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.CommunicationRequestID</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.CommunicationRequestID</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[UpateCommunicationRequestID]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">86d02dff-08ef-e411-a221-0018fefdef3a</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.OperationStatus</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.OperationStatus</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[OperationStatus]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Success</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.Reason:nil</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.Reason:nil</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[UpdateReason]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">true</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.Result</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.Result</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[Result]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">Sent</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.ScheduledFor</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToUpdate.CommsEngineCommunicationToUpdate.ScheduledFor</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[ScheduledFor]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">2015-04-30T14:01:01</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType><d2p1:anyType xmlns:d5p1=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph.String.Xml\" i:type=\"d5p1:XmlPath\"><_x003C_ActualPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToView:nil</_x003C_ActualPath_x003E_k__BackingField><_x003C_DisplayPath_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">CommsEngineResponseViewModels.CommsEngineCommunicationToView:nil</_x003C_DisplayPath_x003E_k__BackingField><_x003C_OutputExpression_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">[[View]]</_x003C_OutputExpression_x003E_k__BackingField><_x003C_SampleData_x003E_k__BackingField xmlns=\"http://schemas.datacontract.org/2004/07/Unlimited.Framework.Converters.Graph\">true</_x003C_SampleData_x003E_k__BackingField></d2p1:anyType></d1p1:_x003C_Paths_x003E_k__BackingField></d2p1:anyType></d1p1:DataSourceShapes><d1p1:Format>ShapedXML</d1p1:Format></z:anyType>]]></OutputDescription>" +
                               "</Action>" +
                               "</Actions>" +
                               "<TypeOf>InvokeWebService</TypeOf>" +
                               "<DisplayName>CEWBSUpdateCommsRequest</DisplayName>" +
                               "<Category>Communications\\Services\\CEWBSUpdateCommsRequest</Category>" +
                               "<VersionInfo DateTimeStamp=\"2015-04-30T14:06:56.2341245+02:00\" Reason=\"\" User=\"\" VersionNumber=\"16\" ResourceId=\"489a3611-523c-40ce-a13d-3fc32b857cdc\" VersionId=\"63895bba-05d2-414b-a4bb-bd189c793a2d\" />  " +
                               "</Service>";
            var xelement   = XElement.Parse(Xml);
            var webService = new WebService(xelement);

            mockResourceCatalog.Setup(c => c.GetResource <WebService>(It.IsAny <Guid>(), It.IsAny <Guid>())).Returns(webService);
            mockResourceCatalog.Setup(c => c.GetResource <WebSource>(It.IsAny <Guid>(), It.IsAny <Guid>())).Verifiable();
            mockResourceCatalog.Setup(c => c.GetResource <WebSource>(It.IsAny <Guid>(), It.IsAny <Guid>())).Returns(new WebSource());
            var webServiceMock = new MockServiceExecutionAbstract <WebService, WebSource>(new DsfDataObject("<DataList></DataList>", Guid.NewGuid()), It.IsAny <bool>());

            webServiceMock.Service           = webService;
            webServiceMock.ReturnFromExecute = "<CommsEngineResponseViewModels xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns=\"http://schemas.datacontract.org/2004/07/TU.Genisys2.CEWBS.ViewModels.Response.CommsEngine\">" +
                                               "<Exception xmlns:d2p1=\"http://schemas.datacontract.org/2004/07/System\" i:nil=\"true\" xmlns=\"http://schemas.datacontract.org/2004/07/TU.Genisys2.CEWBS.ViewModels.Response\" />" +
                                               "<Message i:nil=\"true\" xmlns=\"http://schemas.datacontract.org/2004/07/TU.Genisys2.CEWBS.ViewModels.Response\" />" +
                                               "<ResponseDate xmlns=\"http://schemas.datacontract.org/2004/07/TU.Genisys2.CEWBS.ViewModels.Response\">2015/05/06 02:07:02 PM</ResponseDate>" +
                                               "<Result xmlns=\"http://schemas.datacontract.org/2004/07/TU.Genisys2.CEWBS.ViewModels.Response\">OK</Result>" +
                                               "<StatusCode xmlns=\"http://schemas.datacontract.org/2004/07/TU.Genisys2.CEWBS.ViewModels.Response\">Success</StatusCode>" +
                                               "<CommsEngineCommunicationAdded i:nil=\"true\" />" +
                                               "<CommsEngineCommunicationToSend i:nil=\"true\" />" +
                                               "<CommsEngineCommunicationToUpdate>" +
                                               "<CommsEngineCommunicationToUpdate>" +
                                               "<CommunicationRequestID>dee2c3d6-e6f3-e411-a221-0018fefdef3a</CommunicationRequestID>" +
                                               "<OperationStatus>Success</OperationStatus>" +
                                               "<Reason i:nil=\"true\" />" +
                                               "<Result>Sent</Result>" +
                                               "<ScheduledFor>2015-05-06T14:08:00</ScheduledFor>" +
                                               "</CommsEngineCommunicationToUpdate>" +
                                               "</CommsEngineCommunicationToUpdate>" +
                                               "<CommsEngineCommunicationToView i:nil=\"true\" />" +
                                               "</CommsEngineResponseViewModels>";
            //exe
            ErrorResultTO errors;

            webServiceMock.MockExecuteImpl(null, out errors);
            Assert.IsFalse(errors.HasErrors(), "Error while parsing crazy xml");

            //assert
        }