public void CanReach_GivenNeighbor_ReturnsTrue() { var a = new ProgramGraphNode(1); var b = new ProgramGraphNode(2); a.AddNeighbor(b); Assert.IsTrue(a.CanReach(b.Id)); Assert.IsTrue(b.CanReach(a.Id)); }
public void AddNeighbor_AddsNeighborOnBothSides() { var a = new ProgramGraphNode(1); var b = new ProgramGraphNode(2); a.AddNeighbor(b); Assert.Contains(a, b.Neighbors.ToList()); Assert.Contains(b, a.Neighbors.ToList()); }
public void CanReach_GivenSelf_ReturnsTrue() { var a = new ProgramGraphNode(1); Assert.IsTrue(a.CanReach(1)); }