mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-23 00:18:47 +00:00
tests: 100% coverage on Circle and CircleF
This commit is contained in:
parent
3e4d9603c0
commit
9bb9c9692a
@ -73,6 +73,15 @@ public class CircleFTests
|
||||
Assert.IsFalse(unitCircle1 != unitCircle2);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Equals_ShouldBeTrue_GivenUnitCirclesAsObjects()
|
||||
{
|
||||
CircleF unitCircle1 = CircleF.Unit;
|
||||
object unitCircle2 = CircleF.Unit;
|
||||
Assert.AreEqual(unitCircle1, unitCircle2);
|
||||
Assert.IsTrue(unitCircle1.Equals(unitCircle2));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Equals_ShouldBeFalse_GivenDifferentCircles()
|
||||
{
|
||||
@ -81,6 +90,13 @@ public class CircleFTests
|
||||
Assert.IsTrue(CircleF.Unit != CircleF.Empty);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Equals_ShouldBeFalse_GivenDifferentObjects()
|
||||
{
|
||||
Assert.AreNotEqual((object?)null, CircleF.Empty);
|
||||
Assert.IsFalse(CircleF.Empty.Equals(null));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void GetHashCode_ShouldBeCorrect_GivenEmptyCircle()
|
||||
{
|
||||
|
@ -73,6 +73,15 @@ public class CircleTests
|
||||
Assert.IsFalse(unitCircle1 != unitCircle2);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Equals_ShouldBeTrue_GivenUnitCirclesAsObjects()
|
||||
{
|
||||
Circle unitCircle1 = Circle.Unit;
|
||||
object unitCircle2 = Circle.Unit;
|
||||
Assert.AreEqual(unitCircle1, unitCircle2);
|
||||
Assert.IsTrue(unitCircle1.Equals(unitCircle2));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Equals_ShouldBeFalse_GivenDifferentCircles()
|
||||
{
|
||||
@ -81,6 +90,13 @@ public class CircleTests
|
||||
Assert.IsTrue(Circle.Unit != Circle.Empty);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Equals_ShouldBeFalse_GivenDifferentObjects()
|
||||
{
|
||||
Assert.AreNotEqual((object?)null, Circle.Empty);
|
||||
Assert.IsFalse(Circle.Empty.Equals(null));
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void GetHashCode_ShouldBeCorrect_GivenEmptyCircle()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user