Exemplo n.º 1
0
        public void AllNodesConnectedViaElementsToANodeCanBeFound()
        {
            IList <IFiniteElementNode> results = SUT.GetAllNodesConnectedViaElementsTo(node1);

            Assert.IsNotNull(results);
            Assert.AreEqual(1, results.Count);
            Assert.AreEqual(node2, results[0]);

            results = SUT.GetAllNodesConnectedViaElementsTo(node2);
            Assert.IsNotNull(results);
            Assert.AreEqual(2, results.Count);
            Assert.IsTrue(results.Contains(node1));
            Assert.IsTrue(results.Contains(node3));

            results = SUT.GetAllNodesConnectedViaElementsTo(node3);
            Assert.IsNotNull(results);
            Assert.AreEqual(1, results.Count);
            Assert.AreEqual(node2, results[0]);
        }