public void Property_Container_RoundTrips() { SelectExpandWrapper <TestEntity> wrapper = new SelectExpandWrapper <TestEntity>(); ReflectionAssert.Property( wrapper, w => w.Container, expectedDefaultValue: null, allowNull: true, roundTripTestValue: new MockPropertyContainer()); }
public void Property_ExpectedEdmType() { EdmEntityType edmBaseType = new EdmEntityType("NS", "Base"); EdmEntityType edmDerivedType = new EdmEntityType("NS", "Derived", edmBaseType); TestEdmStructuredObject edmObject = new TestEdmStructuredObject(edmDerivedType); ReflectionAssert.Property(edmObject, o => o.ExpectedEdmType, edmDerivedType, allowNull: false, roundTripTestValue: edmBaseType); }
public void Property_Instance_RoundTrips() { SelectExpandWrapper <TestEntity> wrapper = new SelectExpandWrapper <TestEntity>(); ReflectionAssert.Property(wrapper, w => w.Instance, expectedDefaultValue: null, allowNull: true, roundTripTestValue: new TestEntity()); }
public void Property_Url_RoundTrips() { ReflectionAssert.Property(_context, (c) => c.Url, null, allowNull: true, roundTripTestValue: new UrlHelper(new HttpRequestMessage())); }
public void Property_SerializerContext_RoundTrips() { ReflectionAssert.Property(_context, (c) => c.SerializerContext, _context.SerializerContext, allowNull: true, roundTripTestValue: new ODataSerializerContext()); }
public void Property_StructuredType_RoundTrips() { ReflectionAssert.Property(_context, (c) => c.StructuredType, null, allowNull: true, roundTripTestValue: _entityType); }
public void Property_NavigationSource_RoundTrips() { ReflectionAssert.Property(_context, (c) => c.NavigationSource, null, allowNull: true, roundTripTestValue: new Mock <IEdmEntitySet>().Object); }
public void Property_EdmModel_RoundTrips() { ReflectionAssert.Property(_context, (c) => c.EdmModel, null, allowNull: true, roundTripTestValue: EdmCoreModel.Instance); }
public void Property_ResourceInstance_RoundTrips() { ReflectionAssert.Property(_context, (c) => c.ResourceInstance, null, allowNull: true, roundTripTestValue: _entityInstance); }
public void Property_Request_RoundTrips() { ReflectionAssert.Property(_context, (c) => c.Request, null, allowNull: true, roundTripTestValue: RequestFactory.Create()); }
public void Property_Namespace_RoundTrips() { ReflectionAssert.Property(_configuration, c => c.Namespace, "Namespace", allowNull: false, roundTripTestValue: _namespace); }
public void Property_Url_RoundTrips() { #if NETFX // So far, Asp.NET core version doesn't have Url property. ReflectionAssert.Property(_context, (c) => c.Url, null, allowNull: true, roundTripTestValue: new UrlHelper(new HttpRequestMessage())); #endif }
public void Property_Namespace_RoundTrips() { ReflectionAssert.Property <StructuralTypeConfiguration, string, ArgumentException>(_configuration, c => c.Namespace, "Namespace", allowNull: false, roundTripTestValue: _namespace); }
public void MaxDataServiceVersion_RoundTrips() { ODataModelBuilder builder = new ODataModelBuilder(); ReflectionAssert.Property(builder, b => b.MaxDataServiceVersion, new Version(4, 0), allowNull: false, roundTripTestValue: new Version(1, 0)); }