Наследование: Dev2.Runtime.ESB.Execution.RemoteWorkflowExecutionContainer
        private static RemoteWorkflowExecutionContainerMock CreateExecutionContainer(IResourceCatalog resourceCatalog, string dataListShape, string dataListData, string webResponse, IWebRequestFactory webRequestFactory, IDSFDataObject dataObj)
        {
            ExecutionEnvironmentUtils.UpdateEnvironmentFromXmlPayload(dataObj, new StringBuilder(dataListData), dataListShape, 0);
            var sa         = new ServiceAction();
            var workspace  = new Mock <IWorkspace>();
            var esbChannel = new Mock <IEsbChannel>();

            var container = new RemoteWorkflowExecutionContainerMock(sa, dataObj, workspace.Object, esbChannel.Object,
                                                                     resourceCatalog, webRequestFactory)
            {
                GetRequestRespsonse = webResponse
            };

            return(container);
        }
        static RemoteWorkflowExecutionContainerMock CreateExecutionContainer(IResourceCatalog resourceCatalog, string dataListShape = "<DataList></DataList>", string dataListData = "")
        {
            var dataObj = new Mock <IDSFDataObject>();

            dataObj.Setup(d => d.EnvironmentID).Returns(_connection.ResourceID);
            dataObj.Setup(d => d.ServiceName).Returns("Test");
            dataObj.Setup(d => d.RemoteInvokeResultShape).Returns(new StringBuilder("<ADL><NumericGUID></NumericGUID></ADL>"));
            dataObj.Setup(d => d.Environment).Returns(new ExecutionEnvironment());
            ExecutionEnvironmentUtils.UpdateEnvironmentFromXmlPayload(dataObj.Object, new StringBuilder(dataListData), dataListShape, 0);
            var sa         = new ServiceAction();
            var workspace  = new Mock <IWorkspace>();
            var esbChannel = new Mock <IEsbChannel>();

            var container = new RemoteWorkflowExecutionContainerMock(sa, dataObj.Object, workspace.Object, esbChannel.Object, resourceCatalog)
            {
                GetRequestRespsonse = "<DataList><NumericGUID>74272317-2264-4564-3988-700350008298</NumericGUID></DataList>"
            };

            return(container);
        }
Пример #3
0
        static RemoteWorkflowExecutionContainerMock CreateExecutionContainer(IResourceCatalog resourceCatalog, string dataListShape = "<DataList></DataList>", string dataListData = "")
        {
            ErrorResultTO errors;
            var           compiler   = DataListFactory.CreateDataListCompiler();
            var           dataListID = compiler.ConvertTo(DataListFormat.CreateFormat(GlobalConstants._XML), dataListData.ToStringBuilder(), dataListShape.ToStringBuilder(), out errors);

            var dataObj = new Mock <IDSFDataObject>();

            dataObj.Setup(d => d.DataListID).Returns(dataListID);
            dataObj.Setup(d => d.EnvironmentID).Returns(_connection.ResourceID);
            dataObj.Setup(d => d.ServiceName).Returns("Test");
            dataObj.Setup(d => d.RemoteInvokeResultShape).Returns(new StringBuilder("<ADL><NumericGUID></NumericGUID></ADL>"));

            var sa         = new ServiceAction();
            var workspace  = new Mock <IWorkspace>();
            var esbChannel = new Mock <IEsbChannel>();

            var container = new RemoteWorkflowExecutionContainerMock(sa, dataObj.Object, workspace.Object, esbChannel.Object, resourceCatalog)
            {
                GetRequestRespsonse = "<DataList><NumericGUID>74272317-2264-4564-3988-700350008298</NumericGUID></DataList>"
            };

            return(container);
        }
        static RemoteWorkflowExecutionContainerMock CreateExecutionContainer(IResourceCatalog resourceCatalog, string dataListShape = "<DataList></DataList>", string dataListData = "")
        {

            var dataObj = new Mock<IDSFDataObject>();
            dataObj.Setup(d => d.EnvironmentID).Returns(_connection.ResourceID);
            dataObj.Setup(d => d.ServiceName).Returns("Test");
            dataObj.Setup(d => d.RemoteInvokeResultShape).Returns(new StringBuilder("<ADL><NumericGUID></NumericGUID></ADL>"));
            dataObj.Setup(d => d.Environment).Returns(new ExecutionEnvironment());
            ExecutionEnvironmentUtils.UpdateEnvironmentFromXmlPayload(dataObj.Object,new StringBuilder(dataListData),dataListShape, 0);
            var sa = new ServiceAction();
            var workspace = new Mock<IWorkspace>();
            var esbChannel = new Mock<IEsbChannel>();

            var container = new RemoteWorkflowExecutionContainerMock(sa, dataObj.Object, workspace.Object, esbChannel.Object, resourceCatalog)
            {
                GetRequestRespsonse = "<DataList><NumericGUID>74272317-2264-4564-3988-700350008298</NumericGUID></DataList>"
            };
            return container;
        }