public void Test_FenceTests_Fence() { Fence fence = new Fence(); Assert.False(fence.IsRectangle, "IsRectangle not initialised to false"); Assert.False(fence.HasVertices, "New fence has vertices"); Assert.True(fence.MinX > fence.MaxX && fence.MinY > fence.MaxY, "Fence extents are not reveresed"); Fence fence2 = new Fence(0, 0, 1, 1); Assert.True(fence2.NumVertices == 4 && fence2.Area() == 1.0); }
public void Test_FenceTests_Area() { Fence fence = makeSimpleRectangleFence(); Assert.Equal(10000, fence.Area()); }
public void Test_FenceTests_Area_NoPointsInFence() { Fence fence = new Fence(); Assert.Equal(0, fence.Area()); }