2020-02-23 18:56:15 +00:00
|
|
|
using NUnit.Framework;
|
|
|
|
using RecrownedGTK.Types;
|
|
|
|
namespace RecrownedGTK.Tests.Types {
|
|
|
|
[TestFixture]
|
2020-02-23 21:17:10 +00:00
|
|
|
public class RectangleTest {
|
2020-02-23 18:56:15 +00:00
|
|
|
Rectangle rectangle;
|
|
|
|
[SetUp]
|
|
|
|
public void Setup() {
|
2020-02-29 23:01:56 +00:00
|
|
|
rectangle = new Rectangle();
|
2020-02-23 18:56:15 +00:00
|
|
|
}
|
2020-02-29 23:01:56 +00:00
|
|
|
[TestCase(20, 40, 800)]
|
|
|
|
[TestCase(0, 40, 0)]
|
|
|
|
[TestCase(1f, 3.5f, 3.5f)]
|
|
|
|
public void TestArea(float width, float height, float expected) {
|
|
|
|
rectangle.Width = width;
|
|
|
|
rectangle.Height = height;
|
|
|
|
Assert.AreEqual(expected, rectangle.Area);
|
2020-02-23 18:56:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|