Skip to content

Commit

Permalink
Features/sequential data sources (#196)
Browse files Browse the repository at this point in the history
* Basic sequential data source support, re: issue #184

* Erroring if duplicate sequential data sources are configured

* Extra test coverage

* Erroring if sequential data source configured for simple type members

* Extra test coverage

* Erroring if configured data sources conflict with ignored source members

* Start of API update

* Updating sequential data source API

* Support for conditional sequential data sources

* Extra test coverage

* Extending test coverage

* Adding documentation

* Extra test coverage

* Start of sequential data sources for ctor parameters / Properly using fallback values in more places / Fixing tests

* Moving map methods back into interface to fix test overload resolution?!

* Fixing data source conflict tests

* Removing sequential ctor data source test

* Updating to v1.7-preview1
  • Loading branch information
SteveWilkes authored Apr 20, 2020
1 parent 0163659 commit edc0510
Show file tree
Hide file tree
Showing 50 changed files with 1,213 additions and 265 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ public void ShouldApplyDifferingInlineDelegateDataSources()
.Map(SubtractOne)
.To(pf => pf.Value));


var result2 = mapper
.Map(source2)
.ToANew<PublicField<int>>(c => c
Expand All @@ -172,7 +171,6 @@ public void ShouldApplyDifferingInlineDelegateDataSources()
result1.Value.ShouldBe(source1.Value - 1);
result2.Value.ShouldBe(source2.Value - 3);
}

}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ public void ShouldErrorIfIgnoredMemberHasDataSourceConfiguredInline()
}
});

inlineConfigEx.Message.ShouldContain("Ignored member Target.Value has a configured data source");
inlineConfigEx.Message.ShouldContain("'ctx.Source.Value + \"?!\"'");
inlineConfigEx.Message.ShouldContain("PublicField<string>.Value");
inlineConfigEx.Message.ShouldContain("conflicts with an ignored member");
}

[Fact]
Expand All @@ -97,7 +99,7 @@ public void ShouldErrorIfRedundantDataSourceIsConfiguredInline()
}
});

inlineConfigEx.Message.ShouldContain("already has configured data source 'Person.Id'");
inlineConfigEx.Message.ShouldContain("already has configured data source Person.Id");
}

[Fact]
Expand All @@ -118,7 +120,7 @@ public void ShouldErrorIfConflictingDataSourceIsConfigured()
}
});

conflictEx.Message.ShouldContain("already has configured data source 'Customer.Id'");
conflictEx.Message.ShouldContain("already has configured data source Customer.Id");
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ public void ShouldErrorIfConfiguredDataSourceMemberIsIgnoredInline()
}
});

inlineConfigEx.Message.ShouldContain("Ignored member Target.Value has a configured data source");
inlineConfigEx.Message.ShouldContain("'ctx.Source.Value + \"?!\"'");
inlineConfigEx.Message.ShouldContain("PublicField<string>.Value");
inlineConfigEx.Message.ShouldContain("conflicts with an ignored member");
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public void ShouldErrorIfConflictingDataSourceIsConfigured()
}
});

conflictEx.Message.ShouldContain("already has configured data source 'Person.Id'");
conflictEx.Message.ShouldContain("already has configured data source Person.Id");
}

[Fact]
Expand Down
Loading

0 comments on commit edc0510

Please sign in to comment.