Exemple #1
0
        public void Property_Container_RoundTrips()
        {
            SelectExpandWrapper <TestEntity> wrapper = new SelectExpandWrapper <TestEntity>();

            ReflectionAssert.Property(
                wrapper, w => w.Container, expectedDefaultValue: null, allowNull: true, roundTripTestValue: new MockPropertyContainer());
        }
Exemple #2
0
        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);
        }
Exemple #3
0
        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);
 }
Exemple #10
0
 public void Property_Request_RoundTrips()
 {
     ReflectionAssert.Property(_context, (c) => c.Request, null, allowNull: true, roundTripTestValue: RequestFactory.Create());
 }
Exemple #11
0
 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
        }
Exemple #13
0
 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));
        }