public void CollectionNoErroronEmptyCollectionnTest() { var testCases = new[] { new { CollectionName = (string)null, PayloadItems = new CollectionWriterTestDescriptor.ItemDescription[0], ExpectedException = (ExpectedException)null, }, }; var testDescriptors = testCases.Select(tc => new CollectionWriterTestDescriptor( this.Settings, tc.CollectionName, tc.PayloadItems, tc.ExpectedException, /*model*/ null)); this.CombinatorialEngineProvider.RunCombinations( testDescriptors, this.WriterTestConfigurationProvider.AtomFormatConfigurationsWithIndent, (testDescriptor, testConfig) => { CollectionWriterUtils.WriteAndVerifyCollectionPayload(testDescriptor, testConfig, this.Assert, this.Logger); }); }
private Action <WriterTestConfiguration> WriteCollection(Func <XElement, XElement> fragmentExtractor, Func <ODataVersion, string> expectedXml) { return((testConfiguration) => { if (testConfiguration.IsRequest) { return; } CollectionWriterUtils.WriteAndVerifyCollectionPayload(new CollectionWriterTestDescriptor( this.CollectionSettings, "Collection", new CollectionWriterTestDescriptor.ItemDescription[0], (tc) => { return new AtomWriterTestExpectedResults(this.Settings.ExpectedResultSettings) { FragmentExtractor = fragmentExtractor, Xml = expectedXml(tc.Version), DisableNamespaceNormalization = true }; }, null), testConfiguration, this.Assert, this.Logger); }); }