public void DsfWebPostActivity_Execute_WithInputVariables_ShouldEvalVariablesBeforeExecutingWebRequest()
        {
            //------------Setup for test--------------------------
            const string response = "{\"Location\": \"Paris\",\"Time\": \"May 29, 2013 - 09:00 AM EDT / 2013.05.29 1300 UTC\"," +
                                    "\"Wind\": \"from the NW (320 degrees) at 10 MPH (9 KT) (direction variable):0\"," +
                                    "\"Visibility\": \"greater than 7 mile(s):0\"," +
                                    "\"Temperature\": \"59 F (15 C)\"," +
                                    "\"DewPoint\": \"41 F (5 C)\"," +
                                    "\"RelativeHumidity\": \"51%\"," +
                                    "\"Pressure\": \"29.65 in. Hg (1004 hPa)\"," +
                                    "\"Status\": \"Success\"" +
                                    "}";
            var environment = new ExecutionEnvironment();

            environment.Assign("[[City]]", "PMB", 0);
            environment.Assign("[[CountryName]]", "South Africa", 0);
            environment.Assign("[[Post]]", "Some data", 0);
            var dsfWebPostActivity = new TestDsfWebPostActivity
            {
                Headers = new List <INameValue> {
                    new NameValue("Header 1", "[[City]]")
                },
                QueryString = "http://www.testing.com/[[CountryName]]",
                PostData    = "This is post:[[Post]]"
            };

            dsfWebPostActivity.ResourceCatalog = new Mock <IResourceCatalog>().Object;
            var serviceOutputs = new List <IServiceOutputMapping> {
                new ServiceOutputMapping("Location", "[[weather().Location]]", "weather"), new ServiceOutputMapping("Time", "[[weather().Time]]", "weather"), new ServiceOutputMapping("Wind", "[[weather().Wind]]", "weather"), new ServiceOutputMapping("Visibility", "[[Visibility]]", "")
            };

            dsfWebPostActivity.Outputs = serviceOutputs;
            var serviceXml = XmlResource.Fetch("WebService");
            var service    = new WebService(serviceXml)
            {
                RequestResponse = response
            };

            dsfWebPostActivity.OutputDescription = service.GetOutputDescription();
            dsfWebPostActivity.ResponseFromWeb   = response;
            var dataObjectMock = new Mock <IDSFDataObject>();

            dataObjectMock.Setup(o => o.Environment).Returns(environment);
            dataObjectMock.Setup(o => o.EsbChannel).Returns(new Mock <IEsbChannel>().Object);
            dsfWebPostActivity.ResourceID = InArgument <Guid> .FromValue(Guid.Empty);

            //------------Assert Preconditions-------------------
            Assert.AreEqual(1, dsfWebPostActivity.Headers.Count);
            Assert.AreEqual("Header 1", dsfWebPostActivity.Headers.ToList()[0].Name);
            Assert.AreEqual("[[City]]", dsfWebPostActivity.Headers.ToList()[0].Value);
            Assert.AreEqual("http://www.testing.com/[[CountryName]]", dsfWebPostActivity.QueryString);
            Assert.AreEqual("This is post:[[Post]]", dsfWebPostActivity.PostData);
            //------------Execute Test---------------------------
            dsfWebPostActivity.Execute(dataObjectMock.Object, 0);
            //------------Assert Results-------------------------
            Assert.AreEqual("PMB", dsfWebPostActivity.Head.ToList()[0].Value);
            Assert.AreEqual("http://www.testing.com/South Africa", dsfWebPostActivity.QueryRes);
            Assert.AreEqual("This is post:Some data", dsfWebPostActivity.PostValue);
        }
        public void DsfWebPostActivity_Execute_WithValidXmlEscaped_ShouldSetVariables()
        {
            //------------Setup for test--------------------------
            const string response = "<CurrentWeather>" +
                                    "<Location>&lt;Paris&gt;</Location>" +
                                    "<Time>May 29, 2013 - 09:00 AM EDT / 2013.05.29 1300 UTC</Time>" +
                                    "<Wind>from the NW (320 degrees) at 10 MPH (9 KT) (direction variable):0</Wind>" +
                                    "<Visibility>&lt;greater than 7 mile(s):0&gt;</Visibility>" +
                                    "<Temperature> 59 F (15 C)</Temperature>" +
                                    "<DewPoint> 41 F (5 C)</DewPoint>" +
                                    "<RelativeHumidity> 51%</RelativeHumidity>" +
                                    "<Pressure> 29.65 in. Hg (1004 hPa)</Pressure>" +
                                    "<Status>Success</Status>" +
                                    "</CurrentWeather>";
            var environment = new ExecutionEnvironment();

            environment.Assign("[[City]]", "PMB", 0);
            environment.Assign("[[CountryName]]", "South Africa", 0);
            var dsfWebPostActivity = new TestDsfWebPostActivity();

            dsfWebPostActivity.ResourceCatalog = new Mock <IResourceCatalog>().Object;
            var serviceInputs = new List <IServiceInput> {
                new ServiceInput("CityName", "[[City]]"), new ServiceInput("Country", "[[CountryName]]")
            };
            var serviceOutputs = new List <IServiceOutputMapping> {
                new ServiceOutputMapping("Location", "[[weather().Location]]", "weather"), new ServiceOutputMapping("Time", "[[weather().Time]]", "weather"), new ServiceOutputMapping("Wind", "[[weather().Wind]]", "weather"), new ServiceOutputMapping("Visibility", "[[Visibility]]", "")
            };

            dsfWebPostActivity.Inputs  = serviceInputs;
            dsfWebPostActivity.Outputs = serviceOutputs;
            var serviceXml = XmlResource.Fetch("WebService");
            var service    = new WebService(serviceXml)
            {
                RequestResponse = response
            };

            dsfWebPostActivity.OutputDescription = service.GetOutputDescription();
            dsfWebPostActivity.ResponseFromWeb   = response;
            var dataObjectMock = new Mock <IDSFDataObject>();

            dataObjectMock.Setup(o => o.Environment).Returns(environment);
            dataObjectMock.Setup(o => o.EsbChannel).Returns(new Mock <IEsbChannel>().Object);
            dsfWebPostActivity.ResourceID = InArgument <Guid> .FromValue(Guid.Empty);

            dsfWebPostActivity.QueryString = "";
            dsfWebPostActivity.PostData    = "";
            dsfWebPostActivity.SourceId    = Guid.Empty;
            dsfWebPostActivity.Headers     = new List <INameValue>();
            //------------Execute Test---------------------------
            dsfWebPostActivity.Execute(dataObjectMock.Object, 0);
            //------------Assert Results-------------------------
            Assert.IsNotNull(dsfWebPostActivity.OutputDescription);
            Assert.AreEqual("<greater than 7 mile(s):0>", ExecutionEnvironment.WarewolfEvalResultToString(environment.Eval("[[Visibility]]", 0)));
            Assert.AreEqual("<Paris>", ExecutionEnvironment.WarewolfEvalResultToString(environment.Eval("[[weather().Location]]", 0)));
            Assert.AreEqual("May 29, 2013 - 09:00 AM EDT / 2013.05.29 1300 UTC", ExecutionEnvironment.WarewolfEvalResultToString(environment.Eval("[[weather().Time]]", 0)));
            Assert.AreEqual("from the NW (320 degrees) at 10 MPH (9 KT) (direction variable):0", ExecutionEnvironment.WarewolfEvalResultToString(environment.Eval("[[weather().Wind]]", 0)));
        }
        public void GetDebugInputs_GivenEnvironmentIsNull_ShouldReturnZeroDebugInputs()
        {
            //---------------Set up test pack-------------------
            var dsfWebPostActivity = new TestDsfWebPostActivity();
            //---------------Assert Precondition----------------
            //---------------Execute Test ----------------------
            var debugInputs = dsfWebPostActivity.GetDebugInputs(null, 0);

            //---------------Test Result -----------------------
            Assert.AreEqual(0, debugInputs.Count);
        }
        public void GetFindMissingType_GivenWebPostActivity_ShouldReturnMissingTypeDataGridAcitvity()
        {
            //---------------Set up test pack-------------------
            var dsfWebPostActivity = new TestDsfWebPostActivity();

            //---------------Assert Precondition----------------
            Assert.IsNotNull(dsfWebPostActivity.Type);
            Assert.IsNotNull(dsfWebPostActivity);
            //---------------Execute Test ----------------------
            //---------------Test Result -----------------------
            Assert.AreEqual(enFindMissingType.DataGridActivity, dsfWebPostActivity.GetFindMissingType());
        }
        public void Constructer_GivenHasInstance_ShouldHaveType()
        {
            //---------------Set up test pack-------------------
            var dsfWebPostActivity = new TestDsfWebPostActivity();

            //---------------Assert Precondition----------------
            Assert.IsNotNull(dsfWebPostActivity);
            //---------------Execute Test ----------------------

            //---------------Test Result -----------------------
            Assert.IsNotNull(dsfWebPostActivity.Type);
        }
        public void CleateClient_GivenNoHeaders_ShouldGlobalConstantsUserAgent()
        {
            //---------------Set up test pack-------------------
            var dsfWebPostActivity = new TestDsfWebPostActivity
            {
                QueryString = "http://www.testing.com/[[CountryName]]",
                PostData    = "This is post:[[Post]]"
            };
            var webClient = dsfWebPostActivity.CreateClient(null, String.Empty, new WebSource());
            //---------------Assert Precondition----------------

            //---------------Execute Test ----------------------
            var userAgentValue = webClient.Headers[_userAgent];

            //---------------Test Result -----------------------
            Assert.AreEqual(userAgentValue, GlobalConstants.UserAgentString);
        }
        public void CreateClient_GivenNoHeaders_ShouldHaveTwoHeaders()
        {
            //---------------Set up test pack-------------------
            var dsfWebPostActivity = new TestDsfWebPostActivity
            {
                QueryString = "http://www.testing.com/[[CountryName]]",
                PostData    = "This is post:[[Post]]"
            };

            //---------------Assert Precondition----------------
            Assert.IsNotNull(dsfWebPostActivity);
            //---------------Execute Test ----------------------
            var webClient = dsfWebPostActivity.CreateClient(null, String.Empty, new WebSource());
            //---------------Test Result -----------------------
            var actualHeaderCount = webClient.Headers.Count;

            Assert.AreEqual(1, actualHeaderCount);
        }
        public void DsfWebPostActivity_Execute_WithNoOutputDescription_ShouldAddError()
        {
            //------------Setup for test--------------------------
            const string response = "{\"Location\": \"Paris\",\"Time\": \"May 29, 2013 - 09:00 AM EDT / 2013.05.29 1300 UTC\"," +
                                    "\"Wind\": \"from the NW (320 degrees) at 10 MPH (9 KT) (direction variable):0\"," +
                                    "\"Visibility\": \"greater than 7 mile(s):0\"," +
                                    "\"Temperature\": \"59 F (15 C)\"," +
                                    "\"DewPoint\": \"41 F (5 C)\"," +
                                    "\"RelativeHumidity\": \"51%\"," +
                                    "\"Pressure\": \"29.65 in. Hg (1004 hPa)\"," +
                                    "\"Status\": \"Success\"" +
                                    "}";
            var environment = new ExecutionEnvironment();

            environment.Assign("[[City]]", "PMB", 0);
            environment.Assign("[[CountryName]]", "South Africa", 0);
            var dsfWebPostActivity = new TestDsfWebPostActivity();

            dsfWebPostActivity.ResourceCatalog = new Mock <IResourceCatalog>().Object;
            var serviceInputs = new List <IServiceInput> {
                new ServiceInput("CityName", "[[City]]"), new ServiceInput("Country", "[[CountryName]]")
            };
            var serviceOutputs = new List <IServiceOutputMapping> {
                new ServiceOutputMapping("Location", "[[weather().Location]]", "weather"), new ServiceOutputMapping("Time", "[[weather().Time]]", "weather"), new ServiceOutputMapping("Wind", "[[weather().Wind]]", "weather"), new ServiceOutputMapping("Visibility", "[[Visibility]]", "")
            };

            dsfWebPostActivity.Inputs          = serviceInputs;
            dsfWebPostActivity.Outputs         = serviceOutputs;
            dsfWebPostActivity.ResponseFromWeb = response;
            var dataObjectMock = new Mock <IDSFDataObject>();

            dataObjectMock.Setup(o => o.Environment).Returns(environment);
            dataObjectMock.Setup(o => o.EsbChannel).Returns(new Mock <IEsbChannel>().Object);
            dsfWebPostActivity.ResourceID = InArgument <Guid> .FromValue(Guid.Empty);

            dsfWebPostActivity.QueryString = "";
            dsfWebPostActivity.PostData    = "";
            dsfWebPostActivity.SourceId    = Guid.Empty;
            dsfWebPostActivity.Headers     = new List <INameValue>();
            //------------Execute Test---------------------------
            dsfWebPostActivity.Execute(dataObjectMock.Object, 0);
            //------------Assert Results-------------------------
            Assert.IsNull(dsfWebPostActivity.OutputDescription);
        }
        public void CreateClient_GivenAuthenticationTypeIsNotUser_ShouldNotSetCredentials()
        {
            //---------------Set up test pack-------------------
            var dsfWebPostActivity = new TestDsfWebPostActivity
            {
                QueryString = "http://www.testing.com/[[CountryName]]",
                PostData    = "This is post:[[Post]]"
            };
            var webSource = new WebSource {
                AuthenticationType = AuthenticationType.Windows, UserName = "******", Password = "******"
            };
            var webClient = dsfWebPostActivity.CreateClient(null, String.Empty, webSource);

            //---------------Assert Precondition----------------
            Assert.IsNotNull(webClient);
            //---------------Execute Test ----------------------
            //---------------Test Result -----------------------
            Assert.IsNull(webClient.Credentials);
        }
        public void DsfWebPostActivity_ExecutionImpl_ErrorResultTO_ReturnErrors_ToActivity_Success()
        {
            //-----------------------Arrange-------------------------
            const string response    = "{\"Message\":\"TEST Error\"}";
            var          environment = new ExecutionEnvironment();

            var mockEsbChannel           = new Mock <IEsbChannel>();
            var mockDSFDataObject        = new Mock <IDSFDataObject>();
            var mockExecutionEnvironment = new Mock <IExecutionEnvironment>();

            var errorResultTO = new ErrorResultTO();

            using (var service = new WebService(XmlResource.Fetch("WebService"))
            {
                RequestResponse = response
            })
            {
                mockDSFDataObject.Setup(o => o.Environment).Returns(environment);
                mockDSFDataObject.Setup(o => o.EsbChannel).Returns(new Mock <IEsbChannel>().Object);

                var dsfWebGetActivity = new TestDsfWebPostActivity
                {
                    OutputDescription = service.GetOutputDescription(),
                    ResourceID        = InArgument <Guid> .FromValue(Guid.Empty),
                    QueryString       = "test Query",
                    Headers           = new List <INameValue>(),
                    ResponseFromWeb   = response,
                    HasErrorMessage   = "Some error"
                };
                //-----------------------Act-----------------------------
                dsfWebGetActivity.TestExecutionImpl(mockEsbChannel.Object, mockDSFDataObject.Object, "Test Inputs", "Test Outputs", out errorResultTO, 0);
                //-----------------------Assert--------------------------
                Assert.AreEqual(1, errorResultTO.FetchErrors().Count);
                Assert.AreEqual(response, errorResultTO.FetchErrors()[0]);
            }
        }
        public void CreateClient_GivenHeaders_ShouldHaveHeadersAdded()
        {
            //---------------Set up test pack-------------------
            var dsfWebPostActivity = new TestDsfWebPostActivity
            {
                QueryString = "http://www.testing.com/[[CountryName]]",
                PostData    = "This is post:[[Post]]"
            };

            var headers = new List <INameValue>
            {
                new NameValue("Content", "text/json")
            };

            //---------------Assert Precondition----------------
            Assert.IsNotNull(dsfWebPostActivity);
            //---------------Execute Test ----------------------
            var webClient = dsfWebPostActivity.CreateClient(headers, String.Empty, new WebSource());
            //---------------Test Result -----------------------
            var actualHeaderCount = webClient.Headers.Count;

            Assert.AreEqual(2, actualHeaderCount);
            Assert.AreEqual("text/json", webClient.Headers["Content"]);
        }
        public void GetDebugInputs_GivenMockEnvironment_ShouldAddDebugInputItems()
        {
            //---------------Set up test pack-------------------
            const string response = "{\"Location\": \"Paris\",\"Time\": \"May 29, 2013 - 09:00 AM EDT / 2013.05.29 1300 UTC\"," +
                                    "\"Wind\": \"from the NW (320 degrees) at 10 MPH (9 KT) (direction variable):0\"," +
                                    "\"Visibility\": \"greater than 7 mile(s):0\"," +
                                    "\"Temperature\": \"59 F (15 C)\"," +
                                    "\"DewPoint\": \"41 F (5 C)\"," +
                                    "\"RelativeHumidity\": \"51%\"," +
                                    "\"Pressure\": \"29.65 in. Hg (1004 hPa)\"," +
                                    "\"Status\": \"Success\"" +
                                    "}";
            var environment = new ExecutionEnvironment();

            environment.Assign("[[City]]", "PMB", 0);
            environment.Assign("[[CountryName]]", "South Africa", 0);
            environment.Assign("[[Post]]", "Some data", 0);
            var dsfWebPostActivity = new TestDsfWebPostActivity
            {
                Headers = new List <INameValue> {
                    new NameValue("Header 1", "[[City]]")
                },
                QueryString = "http://www.testing.com/[[CountryName]]",
                PostData    = "This is post:[[Post]]"
            };
            var serviceOutputs = new List <IServiceOutputMapping> {
                new ServiceOutputMapping("Location", "[[weather().Location]]", "weather"), new ServiceOutputMapping("Time", "[[weather().Time]]", "weather"), new ServiceOutputMapping("Wind", "[[weather().Wind]]", "weather"), new ServiceOutputMapping("Visibility", "[[Visibility]]", "")
            };

            dsfWebPostActivity.Outputs = serviceOutputs;
            var serviceXml = XmlResource.Fetch("WebService");
            var service    = new WebService(serviceXml)
            {
                RequestResponse = response
            };

            dsfWebPostActivity.OutputDescription = service.GetOutputDescription();
            dsfWebPostActivity.ResponseFromWeb   = response;
            var dataObjectMock = new Mock <IDSFDataObject>();

            dataObjectMock.Setup(o => o.Environment).Returns(environment);
            dataObjectMock.Setup(o => o.EsbChannel).Returns(new Mock <IEsbChannel>().Object);
            dsfWebPostActivity.ResourceID = InArgument <Guid> .FromValue(Guid.Empty);

            var cat = new Mock <IResourceCatalog>();
            var src = new WebSource {
                Address = "www.example.com"
            };

            cat.Setup(a => a.GetResource <WebSource>(It.IsAny <Guid>(), It.IsAny <Guid>())).Returns(src);
            dsfWebPostActivity.ResourceCatalog = cat.Object;
            //---------------Assert Precondition----------------
            Assert.IsNotNull(environment);
            Assert.IsNotNull(dsfWebPostActivity);
            //---------------Execute Test ----------------------
            var debugInputs = dsfWebPostActivity.GetDebugInputs(environment, 0);

            //---------------Test Result -----------------------
            Assert.IsNotNull(debugInputs);
            Assert.AreEqual(4, debugInputs.Count);
        }
        public void DsfWebPostActivity_Execute_WithValidTextResponse_ShouldSetVariables()
        {
            //------------Setup for test--------------------------
            const string response = "{\"Location\": \"Paris\",\"Time\": \"May 29, 2013 - 09:00 AM EDT / 2013.05.29 1300 UTC\"," +
                                    "\"Wind\": \"from the NW (320 degrees) at 10 MPH (9 KT) (direction variable):0\"," +
                                    "\"Visibility\": \"greater than 7 mile(s):0\"," +
                                    "\"Temperature\": \"59 F (15 C)\"," +
                                    "\"DewPoint\": \"41 F (5 C)\"," +
                                    "\"RelativeHumidity\": \"51%\"," +
                                    "\"Pressure\": \"29.65 in. Hg (1004 hPa)\"," +
                                    "\"Status\": \"Success\"" +
                                    "}";
            var environment = new ExecutionEnvironment();

            environment.Assign("[[City]]", "PMB", 0);
            environment.Assign("[[CountryName]]", "South Africa", 0);
            var dsfWebPostActivity = new TestDsfWebPostActivity();

            dsfWebPostActivity.ResourceCatalog = new Mock <IResourceCatalog>().Object;
            var serviceInputs = new List <IServiceInput> {
                new ServiceInput("CityName", "[[City]]"), new ServiceInput("Country", "[[CountryName]]")
            };
            var serviceOutputs = new List <IServiceOutputMapping> {
                new ServiceOutputMapping("Response", "[[Response]]", "")
            };

            dsfWebPostActivity.Inputs  = serviceInputs;
            dsfWebPostActivity.Outputs = serviceOutputs;

            var serviceXml = XmlResource.Fetch("WebService");
            var service    = new WebService(serviceXml)
            {
                RequestResponse = response
            };

            dsfWebPostActivity.OutputDescription = service.GetOutputDescription();
            dsfWebPostActivity.ResponseFromWeb   = response;
            var dataObjectMock = new Mock <IDSFDataObject>();

            dataObjectMock.Setup(o => o.Environment).Returns(environment);
            dataObjectMock.Setup(o => o.EsbChannel).Returns(new Mock <IEsbChannel>().Object);
            dsfWebPostActivity.ResourceID = InArgument <Guid> .FromValue(Guid.Empty);

            dsfWebPostActivity.QueryString       = "";
            dsfWebPostActivity.PostData          = "";
            dsfWebPostActivity.SourceId          = Guid.Empty;
            dsfWebPostActivity.Headers           = new List <INameValue>();
            dsfWebPostActivity.OutputDescription = new OutputDescription();
            dsfWebPostActivity.OutputDescription.DataSourceShapes.Add(new DataSourceShape()
            {
                Paths = new List <IPath>()
                {
                    new StringPath()
                    {
                        ActualPath = "[[Response]]", OutputExpression = "[[Response]]"
                    }
                }
            });

            //------------Execute Test---------------------------
            dsfWebPostActivity.Execute(dataObjectMock.Object, 0);
            //------------Assert Results-------------------------
            Assert.IsNotNull(dsfWebPostActivity.OutputDescription);
            Assert.AreEqual(response, ExecutionEnvironment.WarewolfEvalResultToString(environment.Eval("[[Response]]", 0)));
        }
Beispiel #14
0
        public void DsfWebPostActivity_ExecutionImpl_ResponseManager_PushResponseIntoEnvironment_GivenJsonResponse_MappedToRecodSet_ShouldSucess()
        {
            //-----------------------Arrange-------------------------
            const string json                  = "{\"Messanger\":\"jSon response from the request\"}";
            var          response              = Convert.ToBase64String(json.ToBytesArray());
            const string mappingFrom           = "mapFrom";
            const string recordSet             = "recset";
            const string mapTo                 = "mapTo";
            const string variableNameMappingTo = "[[recset().mapTo]]";

            var environment = new ExecutionEnvironment();

            var mockEsbChannel           = new Mock <IEsbChannel>();
            var mockDSFDataObject        = new Mock <IDSFDataObject>();
            var mockExecutionEnvironment = new Mock <IExecutionEnvironment>();

            var errorResultTO = new ErrorResultTO();

            using (var service = new WebService(XmlResource.Fetch("WebService"))
            {
                RequestResponse = response
            })
            {
                mockDSFDataObject.Setup(o => o.Environment).Returns(environment);
                mockDSFDataObject.Setup(o => o.EsbChannel).Returns(new Mock <IEsbChannel>().Object);

                var dsfWebGetActivity = new TestDsfWebPostActivity
                {
                    OutputDescription = service.GetOutputDescription(),
                    ResourceID        = InArgument <Guid> .FromValue(Guid.Empty),
                    QueryString       = "test Query",
                    Headers           = new List <INameValue>(),
                    ResponseFromWeb   = response,
                    IsObject          = false,
                    Outputs           = new List <IServiceOutputMapping>
                    {
                        {
                            new ServiceOutputMapping
                            {
                                MappedFrom    = mappingFrom,
                                MappedTo      = mapTo,
                                RecordSetName = recordSet
                            }
                        }
                    }
                };
                //-----------------------Act-----------------------------
                dsfWebGetActivity.TestExecutionImpl(mockEsbChannel.Object, mockDSFDataObject.Object, "Test Inputs", "Test Outputs", out errorResultTO, 0);
                //-----------------------Assert--------------------------
                Assert.IsFalse(errorResultTO.HasErrors());

                //assert first DataSourceShapes
                var resourceManager   = dsfWebGetActivity.ResponseManager;
                var outputDescription = resourceManager.OutputDescription;
                var dataShapes        = outputDescription.DataSourceShapes;
                var paths             = dataShapes.First().Paths;
                Assert.IsNotNull(outputDescription);
                Assert.AreEqual("Messanger", paths.First().ActualPath);
                Assert.AreEqual("Messanger", paths.First().DisplayPath);
                Assert.AreEqual(variableNameMappingTo, paths.First().OutputExpression);
                Assert.AreEqual("jSon response from the request", paths.First().SampleData);

                //assert execution environment
                var envirVariable = environment.Eval(recordSet, 0);
                var ress          = envirVariable as CommonFunctions.WarewolfEvalResult.WarewolfAtomResult;
                Assert.IsNotNull(envirVariable);
                Assert.IsFalse(ress.Item.IsNothing, "Item should contain the recset mapped to the messanger key");
            }
        }