Dev2.Core.Tests.DependencyGraphGeneratorTest.DependencyGraphGenerator_BuildGraph_WhenGraphContainsMalformedGraphTag_ExpectErrorGraph C# (CSharp) Method

DependencyGraphGenerator_BuildGraph_WhenGraphContainsMalformedGraphTag_ExpectErrorGraph() private method

        public void DependencyGraphGenerator_BuildGraph_WhenGraphContainsMalformedGraphTag_ExpectErrorGraph()
        {
            //------------Setup for test--------------------------
            const string graphData = @"<graphz title=""Local Dependants Graph: MyLocalWF"">
              <node id=""9139Local"" x="""" y="""" broken=""false"">
            <dependency id=""MyLocalWF"" />
              </node>
              <node id=""MyLocalWF"" x="""" y="""" broken=""false""></node>
            </graphz>";
            var data = new StringBuilder(graphData);
            var expected = "Dependency information is malformed";
            var dependencyGraphGenerator = new DependencyGraphGenerator();

            //------------Execute Test---------------------------
            var result = dependencyGraphGenerator.BuildGraph(data, "Test Model", 0, 0);

            //------------Assert Results-------------------------
            StringAssert.Contains(result.Title, expected);
        }