public void MetadataDocumentReaderErrorTest() { IEnumerable <MetadataReaderErrorTestCase> testCases = new MetadataReaderErrorTestCase[] { new MetadataReaderErrorTestCase { TestDescriptor = new MetadataReaderTestDescriptor(this.Settings) { PayloadEdmModel = new EdmModel().Fixup(), ExpectedException = ODataExpectedExceptions.TestException(), }, RunInAsync = true, }, new MetadataReaderErrorTestCase { TestDescriptor = new MetadataReaderTestDescriptor(this.Settings) { PayloadEdmModel = new EdmModel().Fixup(), ExpectedException = ODataExpectedExceptions.ODataException("ODataMessageReader_MetadataDocumentInRequest"), }, RunInRequest = true, }, }; this.CombinatorialEngineProvider.RunCombinations( testCases, this.ReaderTestConfigurationProvider.DefaultFormatConfigurations, (testCase, testConfiguration) => { if (testCase.RunInAsync == testConfiguration.Synchronous) { return; } if (testCase.RunInRequest != testConfiguration.IsRequest) { return; } testCase.TestDescriptor.RunTest(testConfiguration); }); }
public void MetadataDocumentReaderErrorTest() { IEnumerable<MetadataReaderErrorTestCase> testCases = new MetadataReaderErrorTestCase[] { new MetadataReaderErrorTestCase { TestDescriptor = new MetadataReaderTestDescriptor(this.Settings) { PayloadEdmModel = new EdmModel().Fixup(), ExpectedException = ODataExpectedExceptions.TestException(), }, RunInAsync = true, }, new MetadataReaderErrorTestCase { TestDescriptor = new MetadataReaderTestDescriptor(this.Settings) { PayloadEdmModel = new EdmModel().Fixup(), ExpectedException = ODataExpectedExceptions.ODataException("ODataMessageReader_MetadataDocumentInRequest"), }, RunInRequest = true, }, }; this.CombinatorialEngineProvider.RunCombinations( testCases, this.ReaderTestConfigurationProvider.DefaultFormatConfigurations, (testCase, testConfiguration) => { if (testCase.RunInAsync == testConfiguration.Synchronous) { return; } if (testCase.RunInRequest != testConfiguration.IsRequest) { return; } testCase.TestDescriptor.RunTest(testConfiguration); }); }