Пример #1
0
        public void TaupoTopLevelFeedTest()
        {
            EntitySetInstance entitySet = new EntitySetInstance(PayloadGenerator.GenerateAtomPayloads().First())
                                          .WithDefaultAtomFeedAnnotations();

            this.CombinatorialEngineProvider.RunCombinations(
                new[] { entitySet },
                this.WriterTestConfigurationProvider.AtomFormatConfigurationsWithIndent,
                (testCase, testConfiguration) =>
            {
                testConfiguration.MessageWriterSettings.SetServiceDocumentUri(ServiceDocumentUri);

                this.WriteAndVerifyODataPayloadElement(testCase, testConfiguration);
            });

            // The ID annotation is added for JSON as even though JSON has no way to represent the ID ODataLib requires it.
            entitySet = new EntitySetInstance(PayloadGenerator.GenerateJsonPayloads().ToArray()).WithDefaultAtomIDAnnotation();

            // TODO: Fix places where we've lost JsonVerbose coverage to add JsonLight
            //this.CombinatorialEngineProvider.RunCombinations(
            //    new[] { entitySet },
            //    this.WriterTestConfigurationProvider.JsonLightFormatConfigurationsWithIndent,
            //    (testCase, testConfiguration) =>
            //    {
            //        this.WriteAndVerifyODataPayloadElement(testCase, testConfiguration);
            //    });
        }