public void Can_Deserialize_ProviderSettings_FromCamelCased_Json()
        {
            //// Arrange
            var extendedData = new ExtendedDataCollection();
            var settings = TestHelper.GetBraintreeProviderSettings();
            extendedData.SaveProviderSettings(settings);

            //// Act
            var json = extendedData.GetValue(Constants.ExtendedDataKeys.BraintreeProviderSettings);
            Assert.IsNotNullOrEmpty(json);

            var deserialized = JsonConvert.DeserializeObject<BraintreeProviderSettings>(json);
            Assert.NotNull(deserialized);

        }
Beispiel #2
0
        public void Can_Serialize_ProviderSettings_To_CamelCased_Json()
        {
            //// Arrange
            var extendedData = new ExtendedDataCollection();
            var settings     = TestHelper.GetBraintreeProviderSettings();

            Assert.NotNull(settings);
            Assert.AreEqual(EnvironmentType.Sandbox, settings.Environment);

            //// Act
            extendedData.SaveProviderSettings(settings);

            //// Assert
            Assert.IsTrue(extendedData.ContainsKey(Constants.ExtendedDataKeys.BraintreeProviderSettings));
        }
        public void Can_Serialize_ProviderSettings_To_CamelCased_Json()
        {
            //// Arrange
            var extendedData = new ExtendedDataCollection();
            var settings = TestHelper.GetBraintreeProviderSettings();
            Assert.NotNull(settings);
            Assert.AreEqual(EnvironmentType.Sandbox, settings.Environment);

            //// Act
            extendedData.SaveProviderSettings(settings);

            //// Assert
            Assert.IsTrue(extendedData.ContainsKey(Constants.ExtendedDataKeys.BraintreeProviderSettings));

        }
Beispiel #4
0
        public void Can_Deserialize_ProviderSettings_FromCamelCased_Json()
        {
            //// Arrange
            var extendedData = new ExtendedDataCollection();
            var settings     = TestHelper.GetBraintreeProviderSettings();

            extendedData.SaveProviderSettings(settings);

            //// Act
            var json = extendedData.GetValue(Constants.ExtendedDataKeys.BraintreeProviderSettings);

            Assert.IsNotNullOrEmpty(json);

            var deserialized = JsonConvert.DeserializeObject <BraintreeProviderSettings>(json);

            Assert.NotNull(deserialized);
        }