forked from fluentassertions/fluentassertions
-
Notifications
You must be signed in to change notification settings - Fork 0
Merge develop & address most PR feedback for issue #1353 #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
closing bracket was missing at 'Include properties and/or fields' section
Update objectgraphs.md
It was difficult to find the official source for the package via the docs. Adding links makes it a bit more clear.
* Add missing example The one about the predicate * change wording change the order in the wording of the text so that it matches the code examples
…egularExpressions.Regex (fluentassertions#1436)
Took me a couple of minutes to figure out the correct call, so I thought - might as well fix it in doc.
- Updated Benchmarks/NestedClass.cs to have two child references of type Nested instead of one. Updated Create to take a ref parameter for counting the objects, since with two recursive calls it is no longer as straightforward. Updated calls from Benchmarks/BeEquivalentTo.cs correspondingly. - Added new benchmark Benchmarks/LargeObjectGraph.cs which sets up object graphs of various sizes and benchmarks BeEquivalentTo between them. - Updated Program.cs to run the new benchmark.
…t to avoid linear lookups. Updated the Equals method in ObjectReference.cs be symmetrical. Added corresponding unit tests. Updated FluentAssertions.Specs.csproj to be strong-named. Updated its reference to Chill to version 4.1.0 and updated AssemblyA.csproj and AssemblyB.csproj to strong name their output as well. Deleted TypeExtensions.cs rfom FluentAssertions.Specs, since it can now use the version internal to FluentAssertions. Updated FluentAssertions.csproj to generate an InternalsVisibleTo attribute granting access to its internals from FluentAssertions.Specs. Reran AcceptApiChanges.ps1, since the API surface area report captures the InternalsVisibleTo attribute.
…ck from the end instead of from the start, removing the need to cache context values immediately. - Updated DetermineCallerIdentity.cs to search backward from the end. Added helper method IsCompilerServices to ignore async machinery. - Added a mechanism to allow some stack frames to be skipped, so that constructs that re-entrantly invoke FluentAssertions and which should find the nested call skip over the outer call. * Added method OverrideStackSearchUsingCurrentScope() to CallerIdentifier.cs, returning an IDisposable that stores a count of stack frames to skip that remains in effect until it is disposed. * Updated call sites in SelfReferencingCollectionAssertions.cs, AsyncFunctionAssertions.cs and DelegateAssertions.cs to use this mechanism.
…until it is actually needed. - Retyped Context to a Lazy<string> in AssertionScope.cs, and updated assignments to Context in EquivalencyValidator.cs and ExceptionAssertions.cs correspondingly.
…ypes that could not possibly satisfy the checks. - Updated GenericDictionaryEquivalencyStep.cs and GenericEnumerableEquivalencyStep.cs to fast-path calls where the supplied type has a TypeCode other than TypeCode.Object.
… when the supplied key is already in the list.
…ataTable, DataRow, and typed data tables). Preparatory work: - Refactored JoinUsingWritingStyle out of Formatting/TimeSpanValueFormatter.cs into an extension method in new file Formatting/EnumerableExtensions.cs. - Added unit tests of JoinUsingWritingStyle in EnumerableExtensionSpecs.cs. - Added a performance optimization to GenericDictionaryEquivalencyStep.cs and GenericEnumerableEquivalencyStep.cs to avoid having TypeExtensions.GetClosedGenericInterfaces call .GetInterfaces() if the TypeCode indicates that the value couldn't possibly implement the specified interface to begin with. Added equivalency steps for dealing with DataSet-related types: - DataSetEquivalencyStep.cs - DataRelationEquivalencyStep.cs - DataTableEquivalencyStep.cs - DataColumnEquivalencyStep.cs - ConstraintCollectionEquivalencyStep.cs - ConstraintEquivalencyStep.cs - DataRowCollectionEquivalencyStep.cs - DataRowEquivalencyStep.cs Updated references to system assemblies as needed: - Added reference to System.Data and System.Data.DataSetExtensions from FluentAssertions.csproj for the net47 target framework. - Added NuGet references to System.Data.DataSetExtensions for the netcoreapp2.1 and netstandard2.0 targets in FluentAssertions.csproj. - Added a package reference to System.Data.DataSetExtensions from Approval.Tests.csproj. - Updated Benchmarks.csproj and NSpec3.Net47.Specs.csproj to reference System.Data.DataSetExtensions in the target framework. Registered these new IEquivalencyStep implementations in GetDefaultSteps in EquivalencyStepCollection.cs. Added new type DataEquivalencyAssertionOptions<T>. Added a new overload of CloneDefaults to AssertionOptions.cs to support cloning to specific types. Added new subclasses of ReferenceTypeAssertions<TSubject, TAssertions> to support tailored Should() options for DataSet and related types: - DataRowAssertions.cs - DataTableAssertions.cs - DataColumnAssertions.cs - DataRowAssertions.cs Added supporting type RowMatchMode.cs. Added a new overload of .Should() to AssertionExtensions.cs for DataColumn, and added DataSetAssertionExtensions.cs, DataTableAssertionExtensions.cs and DataRowAssertionExtensions.cs to provide Should<T> overloads specializing on DataSet, DataTable and DataRow (allowing the compile-time type to be captured). Updated TypeExtensions.cs to short-circuit GetClosedGenericInterfaces if the type isn't an object type. Added unit tests of all the different paths through the code in the new equivalency steps to FluentAssertions.Specs.csproj as Equivalency/DataEquivalencySpecs.*.cs. Added a reference to System.Data.DataSetExtensions in order to use TypedTableBase<T>. Ran AcceptApiChanges.ps1.
- Added LargeDataTableEquivalency.cs to the Benchmarks project with code to predictably populate two identical DataTables then measure the time taken to ensure that they are equivalent. - Added benchmark class UsersOfGetClosedGenericInterfaces.cs to the Benchmarks project. - Added references to the Bogus library and to System.Collections from Benchmarks.csproj. - Updated Program.cs to run the LargeDataTableEquivalency benchmark.
- Added new file docs/_pages/data.md with documentation of System.Data assertions. - Updated docs/_data/navigation.yml to link the System.Data documentation into the navigation tree. - Added mention of the System.Data functionality in the Release Notes (docs/_pages/releases.md).
…tion-assertions
…mentation Improve wildcard documentation
Harden DataSet types against a continuing AssertionScope
fluentassertions#1587) In a chained assertion API call, a second call to ForCondition should not even evaluate its lambda when the previous assertion failed.
Fix build warning
…luentassertions#1575) BeEquivalentTo will no longer include internal properties and fields, unless IncludingInternalProperties or IncludingInternalFields is used
Co-authored-by: Dennis Doomen <dennis.doomen@evision-software.com>
- Remove unneeded test - Fix wording & variable names
Author
|
@Serg046 Hey! I went through and addressed most of the PR feedback on fluentassertions#1435 If you're able to merge, hopefully we can get this changes back into the main repo 👍 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.