1
0
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:
Oliver Booth 2023-04-01 00:30:51 +01:00
parent 8b768f824c
commit dd325ba5c9
No known key found for this signature in database
GPG Key ID: 20BEB9DC87961025
7 changed files with 42 additions and 0 deletions

View File

@ -40,6 +40,12 @@ public class CuboidTests
Assert.IsTrue(Cuboid.Cube != Cuboid.Empty);
}
[TestMethod]
public void Equals_ShouldBeFalse_GivenDifferentObjects()
{
Assert.IsFalse(Cuboid.Cube.Equals(null));
}
[TestMethod]
public void GetHashCode_ShouldBeCorrect_GivenEmptyCircle()
{

View File

@ -60,6 +60,12 @@ public class EllipseFTests
Assert.IsTrue(EllipseF.Unit != EllipseF.Empty);
}
[TestMethod]
public void Equals_ShouldBeFalse_GivenDifferentObjects()
{
Assert.IsFalse(EllipseF.Unit.Equals(null));
}
[TestMethod]
public void GetHashCode_ShouldBeCorrect_GivenEmptyEllipse()
{

View File

@ -51,6 +51,12 @@ public class EllipseTests
Assert.IsTrue(Ellipse.Unit != Ellipse.Empty);
}
[TestMethod]
public void Equals_ShouldBeFalse_GivenDifferentObjects()
{
Assert.IsFalse(Ellipse.Unit.Equals(null));
}
[TestMethod]
public void GetHashCode_ShouldBeCorrect_GivenEmptyEllipse()
{

View File

@ -88,6 +88,12 @@ public class Line3DTests
Assert.IsTrue(Line3D.One != Line3D.Empty);
}
[TestMethod]
public void Equals_ShouldBeFalse_GivenDifferentObjects()
{
Assert.IsFalse(Line3D.One.Equals(null));
}
[TestMethod]
public void GetHashCode_ShouldBeCorrect_GivenEmptyLine()
{

View File

@ -80,6 +80,12 @@ public class LineFTests
Assert.IsTrue(LineF.One != LineF.Empty);
}
[TestMethod]
public void Equals_ShouldBeFalse_GivenDifferentObjects()
{
Assert.IsFalse(LineF.One.Equals(null));
}
[TestMethod]
public void GetHashCode_ShouldBeCorrect_GivenEmptyLine()
{

View File

@ -62,6 +62,12 @@ public class LineTests
Assert.IsTrue(Line.One != Line.Empty);
}
[TestMethod]
public void Equals_ShouldBeFalse_GivenDifferentObjects()
{
Assert.IsFalse(Line.One.Equals(null));
}
[TestMethod]
public void GetHashCode_ShouldBeCorrect_GivenEmptyLine()
{

View File

@ -66,6 +66,12 @@ public class SphereTests
Assert.IsFalse(unitCircle1 != unitCircle2);
}
[TestMethod]
public void Equals_ShouldBeFalse_GivenDifferentObjects()
{
Assert.IsFalse(Sphere.Unit.Equals(null));
}
[TestMethod]
public void Equals_ShouldBeFalse_GivenDifferentCircles()
{