Exemplo n.º 1
0
        public void ToStringShouldReturnNAIfDescriptionNotNullOrEmpty()
        {
            string   expected = "Description: N/A";
            DataEdge edge     = new DataEdge(testNode1, testNode2);
            string   actual   = edge.ToString().Split(',')[1].TrimStart(' ');

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 2
0
        public void ToStringShouldReturnIdNAIfIdNullOrEmpty()
        {
            string expected = "ID: N/A";
            DataEdge edge = new DataEdge(testNode1, testNode2)
            {
                ID = null
            };
            string actual = edge.ToString().Split(',')[0].Replace("[", string.Empty);

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 3
0
        public void ToStringShouldReturnIdIfIdNotNullOrEmpty()
        {
            string   expected = "ID: SnagL Test ID";
            DataEdge edge     = new DataEdge(testNode1, testNode2)
            {
                ID = "SnagL Test ID"
            };
            string actual = edge.ToString().Split(',')[0].Replace("[", string.Empty);

            Assert.AreEqual(expected, actual);
        }
Exemplo n.º 4
0
        public void ToStringShouldReturnDescriptionIfDescriptionNotNullOrEmpty()
        {
            string expected = "Description: SnagL Test Description";
            DataEdge edge = new DataEdge(testNode1, testNode2)
            {
                Description = "SnagL Test Description"
            };
            string actual = edge.ToString().Split(',')[1].TrimStart(' ');

            Assert.AreEqual(expected, actual);
        }