Skip to content

Guidance on Unit/Integration testing of an ITransformProvider implementation #2651

Answered by MihaZupan
saberone asked this question in Q&A
Discussion options

You must be logged in to vote

I'd say it depends on what your transforms are doing. E.g. it might be as simple as something along the lines of

[Theory]
[InlineData("/foo", "Set", "/value", "/value")]
[InlineData("/foo", "Set", "", "")]
[InlineData("/foo", "Prefix", "/value", "/value/foo")]
[InlineData("/value/foo", "RemovePrefix", "/value", "/foo")]
public async Task Set_Path_Success(string initialValue, string modeString, string transformValue, string expected)
{
// We can't put an internal type in a public test API parameter.
var mode = Enum.Parse<PathStringTransform

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by saberone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants