When calling .Content.OverrideValue(alias, value) on a Link property as part of a unit test, where the blocks have been created using UmbracoBlockListFactory, the URL (and other properties) are changed, this is the expected functionality.
When calling .Content.OverrideValue(alias, value) on text property of a GovukTypography block as part of a unit test, where the blocks have been created using UmbracoBlockListFactory, the original value is retained. This is inconsistent with the behaviour of overriding a Link
This means as part of a unit test, you can Assert that a link.Url has the correct, overriden value but on a text property you can only verify that .Content.OverrideValue(alias, value) was called with the correct parameters.
Anecdotally we have had trouble unit testing that legends, hints and text are overriden properly, this may explain why.
I will try to create a branch with tests that demonstrate this bug, I will update this issue if I do
When calling
.Content.OverrideValue(alias, value)
on aLink
property as part of a unit test, where the blocks have been created usingUmbracoBlockListFactory
, the URL (and other properties) are changed, this is the expected functionality.When calling
.Content.OverrideValue(alias, value)
ontext
property of aGovukTypography
block as part of a unit test, where the blocks have been created usingUmbracoBlockListFactory
, the original value is retained. This is inconsistent with the behaviour of overriding aLink
This means as part of a unit test, you can Assert that a
link.Url
has the correct, overriden value but on a text property you can only verify that.Content.OverrideValue(alias, value)
was called with the correct parameters.Anecdotally we have had trouble unit testing that legends, hints and text are overriden properly, this may explain why.
I will try to create a branch with tests that demonstrate this bug, I will update this issue if I do