public void Generate_SingleWithAdditionalLabels_() { List <int> srcList = new List <int>() { 1, 2 }; List <int> dstList = new List <int>() { 3, 4 }; string[,] vertexLabels = new string[, ] { { "nodeValue: 1", "nodeValue: 2", "nodeValue: 3", "nodeValue: 4" }, { "someLabelV: 1", "someLabelV: 2", "", "" } }; string[,] edgeLabels = new string[, ] { { "someLabelE: 1", "someLabelE: 2" } }; LabelGraph labelGraph = new LabelGraph("test2", srcList, dstList, vertexLabels, edgeLabels, 4); GmlGenerator gmlGenerator = new GmlGenerator(); string expected = expectedGmlStrings.Str2; string actual = gmlGenerator.Generate(labelGraph).Replace("\r", ""); expected.Should().BeEquivalentTo(actual); }
public void Generate_SingleWithoutAdditionalLabels_DstSrcEvenNumber_() { LabelGraph labelGraph = GetStr1LabelGraph("test1"); GmlGenerator gmlGenerator = new GmlGenerator(); string expected = expectedGmlStrings.Str1; string actual = gmlGenerator.Generate(labelGraph).Replace("\r", ""); actual.Should().BeEquivalentTo(expected); }
public void Generate_MultipleWithOne_AssertCorrectCount() { LabelGraph l1 = GetStr1LabelGraph("l1"); List <LabelGraph> labelGraphs = new List <LabelGraph>() { l1 }; GmlGenerator gmlGenerator = new GmlGenerator(); int expectedCount = 1; List <ExtensionalGraph> extensionalGraphs = gmlGenerator.Generate(labelGraphs); Assert.AreEqual(expectedCount, extensionalGraphs.Count); }
public void Generate_MultipleWithOne_() { LabelGraph l1 = GetStr1LabelGraph("l1"); List <LabelGraph> labelGraphs = new List <LabelGraph>() { l1 }; GmlGenerator gmlGenerator = new GmlGenerator(); string expected = expectedGmlStrings.Str1; List <ExtensionalGraph> extensionalGraphs = gmlGenerator.Generate(labelGraphs); expected.Should().BeEquivalentTo(extensionalGraphs[0].GraphString.Replace("\r", "")); }