Skip to content

[FEATURE REQUEST] SQLServerDataTable and SQLServerDataColumn implementing equals #1023

Closed

Description

Is your feature request related to a problem? If so, please give a short summary of the problem and how the feature would resolve it

Given that SQLServerDataTable and SQLServerDataColumn are final classes (and this is perfectly fine) they can't be mocked with Mockito 1.19.

When writing unit tests that interact with those classes, you can build the expected SQLServerDatatable and SQLServerDataColumn instances and then compare them with the actual instances via equals()

Those classes do not implement the equals method, therefore their comparision is via identifical reference, not equality.

Describe the preferred solution

An equals() (and therefore a hashCode() method for both classes, in order to be able to compare not same instances to be equal

Describe alternatives you've considered

None

Additional context

The version of the driver is 7.0.0.jre8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

EnhancementAn enhancement to the driver. Lower priority than bugs.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions