public void SameEdges <TVertex, TEdge>([PexAssumeNotNull] IVertexAndEdgeListGraph <TVertex, TEdge> g) where TEdge : IEdge <TVertex> { var ag = GraphExtensions.ToArrayAdjacencyGraph(g); PexAssertEx.AreElementsEqual(g.Edges, ag.Edges, (l, r) => l.Equals(r)); }
public void SameOutEdges <TVertex, TEdge>([PexAssumeNotNull] IVertexAndEdgeListGraph <TVertex, TEdge> g) where TEdge : IEdge <TVertex> { var ag = GraphExtensions.ToArrayAdjacencyGraph(g); foreach (var v in g.Vertices) { PexAssertEx.AreElementsEqual(g.OutEdges(v), ag.OutEdges(v), (l, r) => l.Equals(r)); } }