Expose "expanding" state in API value conversion (#14312)
* Expose "expanding" state in API value conversion * Add unit test * Add non-breaking and obsoletion * Add compat suppressions
This commit is contained in:
@@ -50,7 +50,7 @@ public class CacheTests
|
||||
propertyType.SetupGet(p => p.CacheLevel).Returns(cacheLevel);
|
||||
propertyType.SetupGet(p => p.DeliveryApiCacheLevel).Returns(cacheLevel);
|
||||
propertyType
|
||||
.Setup(p => p.ConvertInterToDeliveryApiObject(It.IsAny<IPublishedElement>(), It.IsAny<PropertyCacheLevel>(), It.IsAny<object?>(), It.IsAny<bool>()))
|
||||
.Setup(p => p.ConvertInterToDeliveryApiObject(It.IsAny<IPublishedElement>(), It.IsAny<PropertyCacheLevel>(), It.IsAny<object?>(), It.IsAny<bool>(), It.IsAny<bool>()))
|
||||
.Returns(() => $"Delivery API value: {++invocationCount}");
|
||||
|
||||
var prop1 = new Property(propertyType.Object, content, publishedSnapshotAccessor.Object);
|
||||
@@ -68,6 +68,7 @@ public class CacheTests
|
||||
It.IsAny<IPublishedElement>(),
|
||||
It.IsAny<PropertyCacheLevel>(),
|
||||
It.IsAny<object?>(),
|
||||
It.IsAny<bool>(),
|
||||
It.IsAny<bool>()),
|
||||
Times.Exactly(expectedConverterHits));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user