Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b6bab8f
commit cdfcadd
Showing
9 changed files
with
299 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
39 changes: 39 additions & 0 deletions
39
Src/FluentAssertions/Equivalency/Matching/MappedMemberMatchingRule.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
// <auto-generated/> | ||
using System; | ||
|
||
namespace FluentAssertions.Equivalency.Matching | ||
{ | ||
internal class MappedMemberMatchingRule : IMemberMatchingRule | ||
{ | ||
private readonly string expectationPropertyPath; | ||
private readonly string subjectPropertyPath; | ||
private Type nestedExpectationType = null; | ||
private Type nestedSubjectType = null; | ||
|
||
public MappedMemberMatchingRule(string expectationPropertyPath, string subjectPropertyPath) | ||
{ | ||
// TODO: What if the property path is empty or null? | ||
// TODO: What if the two paths have a different parent? | ||
|
||
this.expectationPropertyPath = expectationPropertyPath; | ||
this.subjectPropertyPath = subjectPropertyPath; | ||
} | ||
|
||
public MappedMemberMatchingRule(Type expectationType, string expectationPropertyName, Type subjectType, string subjectPropertyName) | ||
{ | ||
// TODO: What if the property is more than just a member name | ||
|
||
nestedExpectationType = expectationType; | ||
nestedSubjectType = subjectType; | ||
} | ||
|
||
public IMember Match(IMember expectedMember, object subject, INode parent, IEquivalencyAssertionOptions options) | ||
{ | ||
if (MatchesExpectation(expectedMember)) | ||
{ | ||
|
||
} | ||
} | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.