示例#1
0
        /// <summary>
        /// Writes the type of extrapolation to perform when a value is requested at a time before any available samples.
        /// </summary>
        /// <param name="extrapolationType">The extrapolation type.</param>
        public void WriteBackwardExtrapolationType(CesiumExtrapolationType extrapolationType)
        {
            OpenIntervalIfNecessary();

            Output.WritePropertyName("backwardExtrapolationType");
            Output.WriteValue(CesiumFormattingHelper.ExtrapolationTypeToString(extrapolationType));
        }
        public void WritesBackwardExtrapolationType()
        {
            const string expectedPropertyName = "foo";
            const CesiumExtrapolationType expectedBackwardExtrapolationType = CesiumExtrapolationType.Extrapolate;

            using (Packet)
                using (var propertyWriter = CreatePropertyWriter(expectedPropertyName))
                {
                    propertyWriter.Open(OutputStream);
                    using (TDerived intervalWriter = propertyWriter.OpenInterval())
                    {
                        intervalWriter.WriteBackwardExtrapolationType(expectedBackwardExtrapolationType);
                    }
                }

            AssertExpectedJson(expectedPropertyName, new Dictionary <string, object>
            {
                { "backwardExtrapolationType", CesiumFormattingHelper.ExtrapolationTypeToString(expectedBackwardExtrapolationType) },
            });
        }
        public void TestExtrapolationTypeToString(CesiumExtrapolationType value)
        {
            string s = CesiumFormattingHelper.ExtrapolationTypeToString(value);

            Assert.IsNotNull(s);
        }