Interface IJsonSerializerSettingsTestBuilder
Used for testing JsonSerializerSettings in a Microsoft.AspNetCore.Mvc.JsonResult.
Namespace:MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json
Assembly:MyTested.AspNetCore.Mvc.ViewActionResults.dll
Syntax
public interface IJsonSerializerSettingsTestBuilder
Methods
| Improve this Doc View SourceContainingConverter(JsonConverter)
Tests whether the JsonSerializerSettings contains the provided JsonConverter.
Declaration
IAndJsonSerializerSettingsTestBuilder ContainingConverter(JsonConverter jsonConverter)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.JsonConverter | jsonConverter | Expected JsonConverter |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
ContainingConverterOfType<TJsonConverter>()
Tests whether the JsonSerializerSettings contains JsonConverter of the provided type.
Declaration
IAndJsonSerializerSettingsTestBuilder ContainingConverterOfType<TJsonConverter>()where TJsonConverter : JsonConverter
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
Type Parameters
Name | Description |
---|---|
TJsonConverter | Expected JsonConverter type. |
ContainingConverters(JsonConverter[])
Tests whether the JsonSerializerSettings contains the provided JsonConverter objects.
Declaration
IAndJsonSerializerSettingsTestBuilder ContainingConverters(params JsonConverter[] jsonConverters)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.JsonConverter[] | jsonConverters | JsonConverter parameters. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
ContainingConverters(IEnumerable<JsonConverter>)
Tests whether the JsonSerializerSettings contains the provided JsonConverter objects.
Declaration
IAndJsonSerializerSettingsTestBuilder ContainingConverters(IEnumerable<JsonConverter> jsonConverters)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<Newtonsoft.Json.JsonConverter> | jsonConverters | Collection of JsonConverter. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithCheckAdditionalContent(Boolean)
Tests the Newtonsoft.Json.JsonSerializerSettings.CheckAdditionalContent property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithCheckAdditionalContent(bool checkAdditionalContent)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | checkAdditionalContent | Expected boolean value. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithConstructorHandling(ConstructorHandling)
Tests the Newtonsoft.Json.JsonSerializerSettings.ConstructorHandling property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithConstructorHandling(ConstructorHandling constructorHandling)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.ConstructorHandling | constructorHandling | Expected ConstructorHandling. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithContractResolver(IContractResolver)
Tests the Newtonsoft.Json.JsonSerializerSettings.ContractResolver property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithContractResolver(IContractResolver contractResolver)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.Serialization.IContractResolver | contractResolver | Expected IContractResolver. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithContractResolverOfType(Type)
Tests the Newtonsoft.Json.JsonSerializerSettings.ContractResolver property in a JsonSerializerSettings object by using the provided type.
Declaration
IAndJsonSerializerSettingsTestBuilder WithContractResolverOfType(Type contractResolverType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | contractResolverType | Expected IContractResolver type. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithContractResolverOfType<TContractResolver>()
Tests the Newtonsoft.Json.JsonSerializerSettings.ContractResolver property in a JsonSerializerSettings object by using generic type.
Declaration
IAndJsonSerializerSettingsTestBuilder WithContractResolverOfType<TContractResolver>()where TContractResolver : IContractResolver
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
Type Parameters
Name | Description |
---|---|
TContractResolver | Expected IContractResolver type. |
WithCulture(CultureInfo)
Tests the Newtonsoft.Json.JsonSerializerSettings.Culture property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithCulture(CultureInfo culture)
Parameters
Type | Name | Description |
---|---|---|
System.Globalization.CultureInfo | culture | Expected CultureInfo. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithDateFormatHandling(DateFormatHandling)
Tests the Newtonsoft.Json.JsonSerializerSettings.DateFormatHandling property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithDateFormatHandling(DateFormatHandling dateFormatHandling)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.DateFormatHandling | dateFormatHandling | Expected DateFormatHandling. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithDateFormatString(String)
Tests the Newtonsoft.Json.JsonSerializerSettings.DateFormatString property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithDateFormatString(string dateFormatString)
Parameters
Type | Name | Description |
---|---|---|
System.String | dateFormatString | Expected date format string. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithDateParseHandling(DateParseHandling)
Tests the Newtonsoft.Json.JsonSerializerSettings.DateParseHandling property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithDateParseHandling(DateParseHandling dateParseHandling)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.DateParseHandling | dateParseHandling | Expected DateParseHandling. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithDateTimeZoneHandling(DateTimeZoneHandling)
Tests the Newtonsoft.Json.JsonSerializerSettings.DateTimeZoneHandling property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithDateTimeZoneHandling(DateTimeZoneHandling dateTimeZoneHandling)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.DateTimeZoneHandling | dateTimeZoneHandling | Expected DateTimeZoneHandling. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithDefaultValueHandling(DefaultValueHandling)
Tests the Newtonsoft.Json.JsonSerializerSettings.DefaultValueHandling property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithDefaultValueHandling(DefaultValueHandling defaultValueHandling)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.DefaultValueHandling | defaultValueHandling | Expected DefaultValueHandling. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithEqualityComparer(IEqualityComparer)
Tests the Newtonsoft.Json.JsonSerializerSettings.EqualityComparer property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithEqualityComparer(IEqualityComparer equalityComparer)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEqualityComparer | equalityComparer | Expected IEqualityComparer. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithEqualityComparerOfType(Type)
Tests the Newtonsoft.Json.JsonSerializerSettings.EqualityComparer property in a JsonSerializerSettings object by using the provided type.
Declaration
IAndJsonSerializerSettingsTestBuilder WithEqualityComparerOfType(Type equalityComparerType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | equalityComparerType | Expected IEqualityComparer type. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithEqualityComparerOfType<TEqualityComparer>()
Tests the Newtonsoft.Json.JsonSerializerSettings.EqualityComparer property in a JsonSerializerSettings object by using the provided type.
Declaration
IAndJsonSerializerSettingsTestBuilder WithEqualityComparerOfType<TEqualityComparer>()where TEqualityComparer : IEqualityComparer
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
Type Parameters
Name | Description |
---|---|
TEqualityComparer | Expected IEqualityComparer type. |
WithFloatFormatHandling(FloatFormatHandling)
Tests the Newtonsoft.Json.JsonSerializerSettings.FloatFormatHandling property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithFloatFormatHandling(FloatFormatHandling floatFormatHandling)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.FloatFormatHandling | floatFormatHandling | Expected FloatFormatHandling. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithFloatParseHandling(FloatParseHandling)
Tests the Newtonsoft.Json.JsonSerializerSettings.FloatParseHandling property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithFloatParseHandling(FloatParseHandling floatParseHandling)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.FloatParseHandling | floatParseHandling | Expected FloatParseHandling. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithFormatting(Formatting)
Tests the Newtonsoft.Json.JsonSerializerSettings.Formatting property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithFormatting(Formatting formatting)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.Formatting | formatting | Expected Formatting. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithMaxDepth(Nullable<Int32>)
Tests the Newtonsoft.Json.JsonSerializerSettings.MaxDepth property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithMaxDepth(int ? maxDepth)
Parameters
Type | Name | Description |
---|---|---|
System.Nullable<System.Int32> | maxDepth | Expected max depth. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithMetadataPropertyHandling(MetadataPropertyHandling)
Tests the Newtonsoft.Json.JsonSerializerSettings.MetadataPropertyHandling property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithMetadataPropertyHandling(MetadataPropertyHandling metadataPropertyHandling)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.MetadataPropertyHandling | metadataPropertyHandling | Expected MetadataPropertyHandling. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithMissingMemberHandling(MissingMemberHandling)
Tests the Newtonsoft.Json.JsonSerializerSettings.MissingMemberHandling property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithMissingMemberHandling(MissingMemberHandling missingMemberHandling)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.MissingMemberHandling | missingMemberHandling | Expected MissingMemberHandling. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithNullValueHandling(NullValueHandling)
Tests the Newtonsoft.Json.JsonSerializerSettings.NullValueHandling property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithNullValueHandling(NullValueHandling nullValueHandling)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.NullValueHandling | nullValueHandling | Expected NullValueHandling. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithObjectCreationHandling(ObjectCreationHandling)
Tests the Newtonsoft.Json.JsonSerializerSettings.ObjectCreationHandling property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithObjectCreationHandling(ObjectCreationHandling objectCreationHandling)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.ObjectCreationHandling | objectCreationHandling | Expected ObjectCreationHandling. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithPreserveReferencesHandling(PreserveReferencesHandling)
Tests the Newtonsoft.Json.JsonSerializerSettings.PreserveReferencesHandling property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithPreserveReferencesHandling(PreserveReferencesHandling preserveReferencesHandling)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.PreserveReferencesHandling | preserveReferencesHandling | Expected PreserveReferencesHandling. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithReferenceLoopHandling(ReferenceLoopHandling)
Tests the Newtonsoft.Json.JsonSerializerSettings.ReferenceLoopHandling property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithReferenceLoopHandling(ReferenceLoopHandling referenceLoopHandling)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.ReferenceLoopHandling | referenceLoopHandling | Expected ReferenceLoopHandling. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithReferenceResolver(IReferenceResolver)
Tests the Newtonsoft.Json.JsonSerializerSettings.ReferenceResolver property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithReferenceResolver(IReferenceResolver referenceResolver)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.Serialization.IReferenceResolver | referenceResolver | Expected IReferenceResolver. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithReferenceResolverOfType(Type)
Tests the Newtonsoft.Json.JsonSerializerSettings.ReferenceResolver property in a JsonSerializerSettings object by using the provided type.
Declaration
IAndJsonSerializerSettingsTestBuilder WithReferenceResolverOfType(Type referenceResolverType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | referenceResolverType | Expected IReferenceResolver type. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithReferenceResolverOfType<TReferenceResolver>()
Tests the Newtonsoft.Json.JsonSerializerSettings.ReferenceResolver property in a JsonSerializerSettings object by using the provided type.
Declaration
IAndJsonSerializerSettingsTestBuilder WithReferenceResolverOfType<TReferenceResolver>()where TReferenceResolver : IReferenceResolver
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
Type Parameters
Name | Description |
---|---|
TReferenceResolver | Expected IReferenceResolver type. |
WithStringEscapeHandling(StringEscapeHandling)
Tests the Newtonsoft.Json.JsonSerializerSettings.StringEscapeHandling property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithStringEscapeHandling(StringEscapeHandling stringEscapeHandling)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.StringEscapeHandling | stringEscapeHandling | Expected StringEscapeHandling. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithTraceWriter(ITraceWriter)
Tests the Newtonsoft.Json.JsonSerializerSettings.TraceWriter property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithTraceWriter(ITraceWriter traceWriter)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.Serialization.ITraceWriter | traceWriter | Expected ITraceWriter. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithTraceWriterOfType(Type)
Tests the Newtonsoft.Json.JsonSerializerSettings.TraceWriter property in a JsonSerializerSettings object by using the provided type.
Declaration
IAndJsonSerializerSettingsTestBuilder WithTraceWriterOfType(Type traceWriterType)
Parameters
Type | Name | Description |
---|---|---|
System.Type | traceWriterType | Expected ITraceWriter type. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithTraceWriterOfType<TTraceWriter>()
Tests the Newtonsoft.Json.JsonSerializerSettings.TraceWriter property in a JsonSerializerSettings object by using the provided type.
Declaration
IAndJsonSerializerSettingsTestBuilder WithTraceWriterOfType<TTraceWriter>()where TTraceWriter : ITraceWriter
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
Type Parameters
Name | Description |
---|---|
TTraceWriter | Expected ITraceWriter type. |
WithTypeNameAssemblyFormat(FormatterAssemblyStyle)
Tests the Newtonsoft.Json.JsonSerializerSettings.TypeNameAssemblyFormat property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithTypeNameAssemblyFormat(FormatterAssemblyStyle typeNameAssemblyFormat)
Parameters
Type | Name | Description |
---|---|---|
System.Runtime.Serialization.Formatters.FormatterAssemblyStyle | typeNameAssemblyFormat | Expected FormatterAssemblyStyle. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |
WithTypeNameHandling(TypeNameHandling)
Tests the Newtonsoft.Json.JsonSerializerSettings.TypeNameHandling property in a JsonSerializerSettings object.
Declaration
IAndJsonSerializerSettingsTestBuilder WithTypeNameHandling(TypeNameHandling typeNameHandling)
Parameters
Type | Name | Description |
---|---|---|
Newtonsoft.Json.TypeNameHandling | typeNameHandling | Expected TypeNameHandling. |
Returns
Type | Description |
---|---|
MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder | The same MyTested.AspNetCore.Mvc.Builders.Contracts.ActionResults.Json.IAndJsonSerializerSettingsTestBuilder. |