Exemple #1
0
        /// <summary>
        /// Checks if two F8 instances are equal
        /// </summary>
        /// <param name="a">The Fallen-8 a</param>
        /// <param name="b">The Fallen-8 b</param>
        /// <returns></returns>
        public static bool CheckIfFallen8IsEqual(Fallen8 a, Fallen8 b)
        {
            Assert.AreEqual(a.VertexCount, b.VertexCount);
            Assert.AreEqual(a.EdgeCount, b.EdgeCount);

            foreach (var aReference in a.GetVertices())
            {
                VertexModel pendant;
                Assert.IsTrue(b.TryGetVertex(out pendant, aReference.Id));
                CheckIfVerticesAreEqual(aReference, pendant);
            }

            foreach (var aReference in a.GetEdges())
            {
                EdgeModel pendant;
                Assert.IsTrue(b.TryGetEdge(out pendant, aReference.Id));
                CheckIfEdgesAreEqual(aReference, pendant);
            }

            return(true);
        }