public void FullMetadataLevelShouldReturnODataConventionalEntityMetadataBuilder() { testSubject.CreateEntityMetadataBuilder( new ODataEntry(), new TestFeedAndEntryTypeContext { UrlConvention = UrlConvention.CreateWithExplicitValue(generateKeyAsSegment: false) }, new ODataFeedAndEntrySerializationInfo(), /*actualEntityType*/ null, SelectedPropertiesNode.EntireSubtree, /*isResponse*/ true, /*keyAsSegment*/ false, /*requestUri*/ null).Should().BeAssignableTo <ODataConventionalEntityMetadataBuilder>(); }
public void FullMetadataLevelCreateMetadataBuilderWithoutMetadataDocumentUriShouldThrow() { var metadataLevelWithoutMetadataDocumentUri = new JsonFullMetadataLevel(/*metadataDocumentUri*/ null, Model); Action test = () => metadataLevelWithoutMetadataDocumentUri .CreateEntityMetadataBuilder( new ODataEntry(), new TestFeedAndEntryTypeContext(), new ODataFeedAndEntrySerializationInfo(), /*actualEntityType*/ null, SelectedPropertiesNode.EntireSubtree, /*isResponse*/ true, /*keyAsSegment*/ false, /*requestUri*/ null); test.ShouldThrow <ODataException>().WithMessage(ODataErrorStrings.ODataOutputContext_MetadataDocumentUriMissing); }