unit tests are done

This commit is contained in:
Brady
2019-10-25 23:25:50 -06:00
parent 62c09e84d6
commit b64540c812
22 changed files with 569 additions and 115 deletions

View File

@@ -34,11 +34,24 @@ namespace Shapes
|| Math.Abs(lengthLine1.ComputeLength() - lengthLine2.ComputeLength()) > TOLERANCE)
throw new ShapeException(errorMessage);
// while (pointList.Count > 0)
// {
// var tmp = pointList[0];
// pointList.Remove(tmp);
// if (pointList.Contains(tmp)) throw new ShapeException(errorMessage);
// }
while (pointList.Count > 0)
{
var tmp = pointList[0];
pointList.Remove(tmp);
if (pointList.Contains(tmp)) throw new ShapeException(errorMessage);
foreach (var point in pointList)
{
if (point.X.Equals(tmp.X) && point.Y.Equals(tmp.Y))
throw new ShapeException(errorMessage);
}
//if (pointList.Contains(tmp)) throw new ShapeException(errorMessage);
}
}
}