public Core.Graph Generate() { var graph = new Core.Graph(_numberOfVertices); graph.Random(_probabilityOfEdgeExistence, _random.NextDouble); return(graph); }
public Graph Map(Core.Graph resource) { return(new Graph { IsTraversable = resource.IsTraversable, Path = resource.Path }); }
public void ItShouldMapGraphCorrectly() { var graph = new Core.Graph { IsTraversable = true, Path = new [] { 1, 3, 5, 7, 9 } }; var response = Sut.Map(graph); response.IsTraversable.Should().Be(graph.IsTraversable); response.Path.Should().BeEquivalentTo(graph.Path); }