public void ReadFeedTest(string uri, string contentType, bool verifyAnnotationsOnStart, Func <string, bool> shouldIncludeAnnotation) { var odataMessageReaderSettings = CreateODataMessageReaderSettings(shouldIncludeAnnotation); var actualAnnotatedItems = CustomInstanceAnnotationsReader.ReadFeed(new Uri(this.ServiceUri + uri), contentType, odataMessageReaderSettings, this.model); actualAnnotatedItems.VerifyAnnotatedItems(contentType, HasExpandedNavigationProperties(uri), verifyAnnotationsOnStart, shouldIncludeAnnotation); }
private void AssertInStreamErrorThrown(string uri, string contentType, string resourceIdentifier, params object[] arguments) { var response = CustomInstanceAnnotationsReader.GetResponseString(new Uri(this.ServiceUri + uri), contentType); // In-stream errors cannot be parsed using ODL reader, so we have to check for a match in the response stream StringResourceUtil.VerifyODataLibString(response, resourceIdentifier, false /* isExactMatch */, arguments); }
public override void CustomTestInitialize() { this.model = CustomInstanceAnnotationsReader.GetServiceModel(new Uri(this.ServiceUri + "$metadata")); }