public void AddVertex_WhenNewVertexId_ThenCreatedVertex() { // given int newVertexId = 13; string property = "qwerty"; // when Vertex <int> result = testObject.AddVertex(newVertexId, property); // then result.Id.Should().Be(newVertexId); testObject.VerticesCount.Should().Be(11); testObject.GetNeighbours(result).Should().BeEmpty(); testObject.Properties[result].Should().Be(property); }
public IEnumerable <Vertex <TVertexId> > GetNeighbours(Vertex <TVertexId> vertex) => graph.GetNeighbours(vertex);