neo4j / neo4j-dotnet-driver

Neo4j Bolt driver for .NET
Apache License 2.0
232 stars 68 forks source link

Internals in MessageResponseHandler for testing only is a code smell #41

Closed IngvarKofoed closed 7 years ago

IngvarKofoed commented 8 years ago

The class MessageResponseHandler : https://github.com/neo4j/neo4j-dotnet-driver/blob/1.0/Neo4j.Driver/Neo4j.Driver/Internal/Connector/MessageResponseHandler.cs Has the following internals:

internal Queue<IResultBuilder> ResultBuilders => new Queue<IResultBuilder>(_resultBuilders);
internal Queue<IRequestMessage> SentMessages => new Queue<IRequestMessage>(_sentMessages); 

This is a code smell that the OOP design is not complete and I think this should be refactored so that there is no need for internals for testing.

If you agree Ill happily create a PR for how to fix this code smell :)

zhenlineo commented 8 years ago

Yes, if you have some good ideas to design it better, yes, please. I would say this is a good improvement so I would suggest to target it at 1.1.

technige commented 7 years ago

Closing this issue, please raise in PR if still desired.