public void Equality_SameVertex_IsTrue() { var vertex = new VertexIdx(0); var other = new VertexIdx(0); Assert.That(vertex == other, Is.True); }
public void Inequality_OtherVertex_IsTrue() { var vertex = new VertexIdx(0); var other = new VertexIdx(1); Assert.That(vertex != other, Is.True); }
/// <inheritdoc/> public VertexIdx AddVertex(TVertex vertex) { var vertexData = new VertexData { Data = vertex, StartIndex = -1, EdgeStorage = default }; var index = new VertexIdx(this._vertices.Add(vertexData)); return(index); }
/// <inheritdoc/> public void RemoveVertex(VertexIdx vertex) { ref var vertexData = ref this._vertices[vertex.Index];
public void ToString_FormattedAsDefined() { var vertex = new VertexIdx(42); Assert.That(vertex.ToString(), Is.EqualTo("#42")); }
public void Equals_SomeObject_IsFalse() { var vertex = new VertexIdx(0); Assert.That(vertex.Equals(new object()), Is.False); }
public void Equals_Null_IsFalse() { var vertex = new VertexIdx(0); Assert.That(vertex.Equals(null), Is.False); }
public void Equals_SameVertexObject_IsTrue() { var vertex = new VertexIdx(0); Assert.That(vertex.Equals((object)new VertexIdx(0)), Is.True); }
public void Equals_OtherVertex_IsFalse() { var vertex = new VertexIdx(0); Assert.That(vertex.Equals(new VertexIdx(1)), Is.False); }
public void Index_IsAsConstructed() { var vertex = new VertexIdx(42); Assert.That(vertex.Index, Is.EqualTo(42)); }