"Land grab in space" has insufficient test coverage for the plot with longest side

It is currently possible to “pass” the tests for finding the plot with longest side by just returning the 1st plot.

I propose to add these 2 tests:

    [Fact]
    [Task(4)]
    public void GetLongestSideReverseInsertionOrder()
    {
        var ch = new ClaimsHandler();
        var longer = CreatePlot(new Coord(10, 1), new Coord(20, 1), new Coord(10, 2), new Coord(20, 2));
        var shorter = CreatePlot(new Coord(1, 1), new Coord(2, 1), new Coord(1, 2), new Coord(2, 2));
        ch.StakeClaim(shorter);
        ch.StakeClaim(longer);
        Assert.Equal(longer, ch.GetClaimWithLongestSide());
    }

    [Fact]
    [Task(4)]
    public void GetLongestSideDiagonal1()
    {
        var ch = new ClaimsHandler();
        // Bottom left, bottom right, top left, top right. The longest side is 10, diagonal is >14
        var shorter = CreatePlot(new Coord(0, 0), new Coord(0, 10), new Coord(10, 0), new Coord(10, 10));
        // Bottom left, top left, top right, bottom right, longest side 11
        var longer = CreatePlot(new Coord(0, 0), new Coord(11, 0), new Coord(11, 11), new Coord(0, 11));
        ch.StakeClaim(shorter);
        ch.StakeClaim(longer);
        Assert.Equal(longer, ch.GetClaimWithLongestSide());
    }

What language is this? :slight_smile:

Should have mentioned - I’m talking about C# in particular. I don’t know if other languages also have this problem.