Skip to content

Document migration path from single array to 2D array assertions introduced in 3.17.0 #98

@mipper

Description

@mipper

Summary

The hasSize(int) method is no longer available on 2D arrays after commit assertj/assertj@a36275e which was released as part of 3.17.0.

I have no idea whether other methods have also become unavailable on this, not whether other array classes are affected.

Example

This test will compile under 3.16.1 but not on any version after that up to 3.18.1.

package org.asserj;

import org.junit.Test;

import static org.assertj.core.api.Assertions.assertThat;

public class HasSizeTest
{
    @Test
    public void shouldAnswerWithTrue()
    {
        assertThat(new String[][] { { "1" } }).hasSize(1);
    }
}

Metadata

Metadata

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions