mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-09 23:25:43 +00:00
test: test Equals(object) for various Drawing types
This brings coverage to 100% for the affected types.
This commit is contained in:
parent
8b768f824c
commit
dd325ba5c9
@ -40,6 +40,12 @@ public class CuboidTests
|
|||||||
Assert.IsTrue(Cuboid.Cube != Cuboid.Empty);
|
Assert.IsTrue(Cuboid.Cube != Cuboid.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Equals_ShouldBeFalse_GivenDifferentObjects()
|
||||||
|
{
|
||||||
|
Assert.IsFalse(Cuboid.Cube.Equals(null));
|
||||||
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void GetHashCode_ShouldBeCorrect_GivenEmptyCircle()
|
public void GetHashCode_ShouldBeCorrect_GivenEmptyCircle()
|
||||||
{
|
{
|
||||||
|
@ -60,6 +60,12 @@ public class EllipseFTests
|
|||||||
Assert.IsTrue(EllipseF.Unit != EllipseF.Empty);
|
Assert.IsTrue(EllipseF.Unit != EllipseF.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Equals_ShouldBeFalse_GivenDifferentObjects()
|
||||||
|
{
|
||||||
|
Assert.IsFalse(EllipseF.Unit.Equals(null));
|
||||||
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void GetHashCode_ShouldBeCorrect_GivenEmptyEllipse()
|
public void GetHashCode_ShouldBeCorrect_GivenEmptyEllipse()
|
||||||
{
|
{
|
||||||
|
@ -51,6 +51,12 @@ public class EllipseTests
|
|||||||
Assert.IsTrue(Ellipse.Unit != Ellipse.Empty);
|
Assert.IsTrue(Ellipse.Unit != Ellipse.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Equals_ShouldBeFalse_GivenDifferentObjects()
|
||||||
|
{
|
||||||
|
Assert.IsFalse(Ellipse.Unit.Equals(null));
|
||||||
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void GetHashCode_ShouldBeCorrect_GivenEmptyEllipse()
|
public void GetHashCode_ShouldBeCorrect_GivenEmptyEllipse()
|
||||||
{
|
{
|
||||||
|
@ -88,6 +88,12 @@ public class Line3DTests
|
|||||||
Assert.IsTrue(Line3D.One != Line3D.Empty);
|
Assert.IsTrue(Line3D.One != Line3D.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Equals_ShouldBeFalse_GivenDifferentObjects()
|
||||||
|
{
|
||||||
|
Assert.IsFalse(Line3D.One.Equals(null));
|
||||||
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void GetHashCode_ShouldBeCorrect_GivenEmptyLine()
|
public void GetHashCode_ShouldBeCorrect_GivenEmptyLine()
|
||||||
{
|
{
|
||||||
|
@ -80,6 +80,12 @@ public class LineFTests
|
|||||||
Assert.IsTrue(LineF.One != LineF.Empty);
|
Assert.IsTrue(LineF.One != LineF.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Equals_ShouldBeFalse_GivenDifferentObjects()
|
||||||
|
{
|
||||||
|
Assert.IsFalse(LineF.One.Equals(null));
|
||||||
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void GetHashCode_ShouldBeCorrect_GivenEmptyLine()
|
public void GetHashCode_ShouldBeCorrect_GivenEmptyLine()
|
||||||
{
|
{
|
||||||
|
@ -62,6 +62,12 @@ public class LineTests
|
|||||||
Assert.IsTrue(Line.One != Line.Empty);
|
Assert.IsTrue(Line.One != Line.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Equals_ShouldBeFalse_GivenDifferentObjects()
|
||||||
|
{
|
||||||
|
Assert.IsFalse(Line.One.Equals(null));
|
||||||
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void GetHashCode_ShouldBeCorrect_GivenEmptyLine()
|
public void GetHashCode_ShouldBeCorrect_GivenEmptyLine()
|
||||||
{
|
{
|
||||||
|
@ -66,6 +66,12 @@ public class SphereTests
|
|||||||
Assert.IsFalse(unitCircle1 != unitCircle2);
|
Assert.IsFalse(unitCircle1 != unitCircle2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[TestMethod]
|
||||||
|
public void Equals_ShouldBeFalse_GivenDifferentObjects()
|
||||||
|
{
|
||||||
|
Assert.IsFalse(Sphere.Unit.Equals(null));
|
||||||
|
}
|
||||||
|
|
||||||
[TestMethod]
|
[TestMethod]
|
||||||
public void Equals_ShouldBeFalse_GivenDifferentCircles()
|
public void Equals_ShouldBeFalse_GivenDifferentCircles()
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user