public void SelectDuplicatePropertyWithTopFails() { const string selectClauseText = "Address/NearestAirports($top=2),Address/NearestAirports"; System.Action test = () => this.ParseAndExtract(selectClauseText: selectClauseText, expandClauseText: null, expectedSelectClauseFromOM: null, expectedExpandClauseFromOM: null); test.Throws <ODataException>("Found multiple select terms with same select path 'Address/NearestAirports' at one $select, please combine them together."); }
public void DuplicateDeepSelectOptionsFails() { const string selectClauseText = "Address($select=NearestAirports($select=City),NearestAirports($select=Region))"; System.Action test = () => this.ParseAndExtract(selectClauseText: selectClauseText, expandClauseText: null, expectedSelectClauseFromOM: null, expectedExpandClauseFromOM: null); test.Throws <ODataException>("Found multiple select terms with same select path 'NearestAirports' at one $select, please combine them together."); }
public void DifferentPathsToSamePropertyWithSubselectsOnBothFails() { const string selectClauseText = "Address($select=NearestAirports($select=City)),Address/NearestAirports($select=Region)"; System.Action test = () => this.ParseAndExtract(selectClauseText: selectClauseText, expandClauseText: null, expectedSelectClauseFromOM: null, expectedExpandClauseFromOM: null); test.Throws <ODataException>("Found multiple select terms with same select path 'Address/NearestAirports' at one $select, please combine them together."); }
public void SelectDuplicatePropertyThrows() { const string selectClauseText = "Id,Id"; const string expectedSelectClauseText = "Id"; System.Action test = () => this.ParseAndExtract(selectClauseText: selectClauseText, expandClauseText: null, expectedSelectClauseFromOM: expectedSelectClauseText, expectedExpandClauseFromOM: null); test.Throws <ODataException>("Found mutliple select terms with same select path 'Id' at one $select, please combine them together."); }