Provides an abstraction for creating the JavaScriptEncoder used in SystemTextConfigurationEditorJsonSerializer (#19849)
* Provides an abstraction for creating the JavaScriptEncoder used in SystemTextConfigurationEditorJsonSerializer. * Generalised JSON serialization encoder factory to work for all System.Tex.Json serializers. Added the serializer's name as a parameter to allow for different encodings per serializer if required. * Fixed tests by removing use of obsolete constructors. * Removed name parameter and used a generic type instead.
This commit is contained in:
@@ -637,14 +637,14 @@ public class VariationTests
|
||||
attribute,
|
||||
Mock.Of<ILocalizedTextService>(),
|
||||
Mock.Of<IShortStringHelper>(),
|
||||
new SystemTextJsonSerializer(),
|
||||
new SystemTextJsonSerializer(new DefaultJsonSerializerEncoderFactory()),
|
||||
Mock.Of<IIOHelper>()));
|
||||
|
||||
var textBoxEditor = new TextboxPropertyEditor(
|
||||
dataValueEditorFactory,
|
||||
ioHelper);
|
||||
|
||||
var serializer = new SystemTextConfigurationEditorJsonSerializer();
|
||||
var serializer = new SystemTextConfigurationEditorJsonSerializer(new DefaultJsonSerializerEncoderFactory());
|
||||
|
||||
var mockDataTypeService = new Mock<IDataTypeService>();
|
||||
Mock.Get(dataTypeService).Setup(x => x.GetDataType(It.Is<int>(y => y == Constants.DataTypes.Textbox)))
|
||||
|
||||
Reference in New Issue
Block a user