VertexFormatTests AreEqual Method Delta Engine Documentation

Namespace: DeltaEngine.Graphics.Tests
Assembly: DeltaEngine.Graphics.Tests (in DeltaEngine.Graphics.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void AreEqual()
Examples

[Test]
public void AreEqual()
{
    var elements = new[] {
        new VertexElement(VertexElementType.Position3D),
        new VertexElement(VertexElementType.TextureUV) };
    var format = new VertexFormat(elements);
    Assert.IsTrue(VertexFormat.Position3DUV.Equals(format));
    Assert.IsTrue(VertexFormat.Position3DUV.Equals((object)format));
    Assert.AreEqual(VertexFormat.Position3DUV, format);
    Assert.IsTrue(VertexFormat.Position3DUV == format);
    Assert.IsTrue(VertexFormat.Position2DUV.Equals(VertexFormat.Position2DUV));
    Assert.IsFalse(VertexFormat.Position2DUV == VertexFormat.Position2DColor);
    Assert.AreEqual(VertexFormat.Position2DUV, VertexFormat.Position2DUV);
    Assert.AreNotEqual(VertexFormat.Position2DUV, VertexFormat.Position2DColor);
    VertexFormat unassignedFormat = null;
    Assert.IsTrue(unassignedFormat == null);
}
See Also