Addind more Unit Test

This commit is contained in:
Brady Bodily
2019-10-25 15:39:00 -06:00
parent ada7171a9d
commit 557ed0a03c
10 changed files with 284 additions and 40 deletions

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Drawing;
using System.Drawing.Imaging;
using System.IO;
@@ -112,6 +113,7 @@ namespace Shapes
public override void Scale(double scaleFactor)
{
Validator.ValidatePositiveDouble(scaleFactor, "Invalid scale factor");
foreach (var point in Points)
{
point.X *= scaleFactor;
@@ -124,6 +126,7 @@ namespace Shapes
_fileWriter.SaveShape(stream, this);
}
[ExcludeFromCodeCoverage]
public override void Draw(Stream stream)
{
var tmp = new Bitmap((int) Width * 2, (int) Height * 2);