Esempio n. 1
0
        internal RoundTripperBase(
            Func <ConnectionSettings, ConnectionSettings> settingsModifier     = null,
            ConnectionSettings.SourceSerializerFactory sourceSerializerFactory = null,
            IPropertyMappingProvider propertyMappingProvider = null,
            bool preserveNullInExpected = false
            )
        {
            PreserveNullInExpected = preserveNullInExpected;
            if (settingsModifier == null && sourceSerializerFactory == null && propertyMappingProvider == null)
            {
                Tester = SerializationTester.Default;
            }
            else
            {
                var settings =
                    new AlwaysInMemoryConnectionSettings(sourceSerializerFactory: sourceSerializerFactory,
                                                         propertyMappingProvider: propertyMappingProvider)
                    .ApplyDomainSettings();

                if (settingsModifier != null)
                {
                    settings = settingsModifier(settings);
                }
                Tester = new SerializationTester(new ElasticClient(settings));
            }
        }
Esempio n. 2
0
 internal JsonRoundTripperContinuation(object expectedJson, T result, SerializationTester tester)
 {
     this.Tester        = tester;
     this.Result        = result;
     this._expectedJson = expectedJson;
 }