public ODataOperationTests()
        {
            this.testSubject = new TestODataOperation();

            var entry = new ODataEntry
            {
                TypeName   = "ns.DerivedType",
                Properties = new[]
                {
                    new ODataProperty {
                        Name = "Id", Value = 1, SerializationInfo = new ODataPropertySerializationInfo {
                            PropertyKind = ODataPropertyKind.Key
                        }
                    },
                    new ODataProperty {
                        Name = "Name", Value = "Bob", SerializationInfo = new ODataPropertySerializationInfo {
                            PropertyKind = ODataPropertyKind.ETag
                        }
                    }
                }
            };

            var serializationInfo = new ODataFeedAndEntrySerializationInfo {
                NavigationSourceName = "Set", NavigationSourceEntityTypeName = "ns.BaseType", ExpectedTypeName = "ns.BaseType"
            };
            var typeContext          = ODataFeedAndEntryTypeContext.Create(serializationInfo, null, null, null, EdmCoreModel.Instance, true);
            var metadataContext      = new TestMetadataContext();
            var entryMetadataContext = ODataEntryMetadataContext.Create(entry, typeContext, serializationInfo, null, metadataContext, SelectedPropertiesNode.EntireSubtree);
            var fullMetadataBuilder  = new ODataConventionalEntityMetadataBuilder(entryMetadataContext, metadataContext, new ODataConventionalUriBuilder(ServiceUri, UrlConvention.CreateWithExplicitValue(false)));

            this.operationWithFullBuilder = new TestODataOperation {
                Metadata = ContextUri
            };
            this.operationWithFullBuilder.SetMetadataBuilder(fullMetadataBuilder, MetadataDocumentUri);
        }
        public ODataOperationTests()
        {
            this.testSubject = new TestODataOperation();

            var entry = new ODataEntry
            {
                TypeName = "ns.DerivedType",
                Properties = new[]
                {
                    new ODataProperty{Name = "Id", Value = 1, SerializationInfo = new ODataPropertySerializationInfo{PropertyKind = ODataPropertyKind.Key}},
                    new ODataProperty{Name = "Name", Value = "Bob", SerializationInfo = new ODataPropertySerializationInfo{PropertyKind = ODataPropertyKind.ETag}}
                }
            };

            var serializationInfo = new ODataFeedAndEntrySerializationInfo { NavigationSourceName = "Set", NavigationSourceEntityTypeName = "ns.BaseType", ExpectedTypeName = "ns.BaseType" };
            var typeContext = ODataFeedAndEntryTypeContext.Create(serializationInfo, null, null, null, EdmCoreModel.Instance, true);
            var metadataContext = new TestMetadataContext();
            var entryMetadataContext = ODataEntryMetadataContext.Create(entry, typeContext, serializationInfo, null, metadataContext, SelectedPropertiesNode.EntireSubtree);
            var fullMetadataBuilder = new ODataConventionalEntityMetadataBuilder(entryMetadataContext, metadataContext, new ODataConventionalUriBuilder(ServiceUri, UrlConvention.CreateWithExplicitValue(false)));
            this.operationWithFullBuilder = new TestODataOperation { Metadata = ContextUri };
            this.operationWithFullBuilder.SetMetadataBuilder(fullMetadataBuilder, MetadataDocumentUri);
        }
        public ODataOperationTests()
        {
            this.testSubject = new TestODataOperation();

            var entry = new ODataResource
            {
                TypeName   = "ns.DerivedType",
                Properties = new[]
                {
                    new ODataProperty {
                        Name = "Id", Value = 1, SerializationInfo = new ODataPropertySerializationInfo {
                            PropertyKind = ODataPropertyKind.Key
                        }
                    },
                    new ODataProperty {
                        Name = "Name", Value = "Bob", SerializationInfo = new ODataPropertySerializationInfo {
                            PropertyKind = ODataPropertyKind.ETag
                        }
                    }
                }
            };

            var serializationInfo = new ODataResourceSerializationInfo {
                NavigationSourceName = "Set", NavigationSourceEntityTypeName = "ns.BaseType", ExpectedTypeName = "ns.BaseType"
            };
            var typeContext          = ODataResourceTypeContext.Create(serializationInfo, null, null, null, true);
            var metadataContext      = new TestMetadataContext();
            var entryMetadataContext = ODataResourceMetadataContext.Create(entry, typeContext, serializationInfo, null, metadataContext, new SelectedPropertiesNode(SelectedPropertiesNode.SelectionType.EntireSubtree));
            var fullMetadataBuilder  = new ODataConventionalEntityMetadataBuilder(entryMetadataContext, metadataContext,
                                                                                  new ODataConventionalUriBuilder(ServiceUri, ODataUrlKeyDelimiter.Parentheses));

            this.operationWithFullBuilder = new TestODataOperation {
                Metadata = ContextUri
            };
            this.operationWithFullBuilder.SetMetadataBuilder(fullMetadataBuilder, MetadataDocumentUri);
        }