[CSHARP-1109] Remove project reference from MongoDB.Driver.Tests to MongoDB.Driver.Core.Tests Created: 20/Nov/14  Updated: 02/Apr/15  Resolved: 02/Dec/14

Status: Closed
Project: C# Driver
Component/s: Testing
Affects Version/s: None
Fix Version/s: 2.0

Type: Improvement Priority: Major - P3
Reporter: Robert Stam Assignee: Robert Stam
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

We currently have a reference from the MongoDB.Driver.Tests project to the MongoDB.Driver.Core.Tests projects. The reason for the reference is to gain access to the RequiresServerAttribute.

But we shouldn't have a reference to the entire test project. That gives unintended access to everything in the project and can result in name conflicts or subtle bugs.

We should either just copy/adapt the one class that is currently being accessed via the reference, or create a helper DLL with the shared types that any test project can reference.



 Comments   
Comment by Githook User [ 03/Dec/14 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}

Message: CSHARP-1109: Remove the new internal constructor from MongoClient and change the Configuration static constructor back to using the original MongoClient constructor. This way our unit tests will be using the same code path as our users.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/5af820021586adc5eced9f41ee7faffb689575f4

Comment by Githook User [ 02/Dec/14 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}

Message: CSHARP-1109: Added MongoDB.Driver.Core.TestHelpers to house test related helper classes that are shared by multiple test projects.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/fb54ede3dac79bc6974f961c1e965aa4c7d7d92c

Comment by Githook User [ 02/Dec/14 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}

Message: CSHARP-1109: Added overloads of BeUsing and EqualUsing that take an IEqualityComparer.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/10326ec298b52a39d5b0ad475ffaf5400c4117d9

Comment by Githook User [ 02/Dec/14 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}

Message: CSHARP-1109: Begin moving common test helper methods into DLLs where they can be shared by more than one test project.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/d640def53e37353c404c9072114b7b53074d1c7e

Comment by Robert Stam [ 01/Dec/14 ]

As a first step we are creating a MongoDB.Bson.TestHelpers projects to hold some helper classes useful across all our test projects.

Initially this revolves around centralizing some FluentAssertions related helpers, including a way to assert that an actual object is equal to an expected object using specified equality comparers (useful when the objects being asserted against don't override Equals) and a new BsonDocumentAssertions class that lets us provide custom assertions for BsonDocuments.

Generated at Wed Feb 07 21:38:41 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.