public void TryGetValue_ThrowsInvalidOperation_EdmComplexObjectNullRef() { IEdmComplexTypeReference edmType = new EdmComplexTypeReference(new EdmComplexType("NS", "ComplexType"), isNullable: true); NullEdmComplexObject nullComplexObject = new NullEdmComplexObject(edmType); object propertyValue; Assert.Throws <InvalidOperationException>(() => nullComplexObject.TryGetPropertyValue("property", out propertyValue), "Cannot get property 'property' of a null EDM object of type '[NS.ComplexType Nullable=True]'."); }
public void TryGetValue_ThrowsInvalidOperation_EdmComplexObjectNullRef() { IEdmComplexTypeReference edmType = new EdmComplexTypeReference(new EdmComplexType("NS", "ComplexType"), isNullable: true); NullEdmComplexObject nullComplexObject = new NullEdmComplexObject(edmType); object propertyValue; Assert.Throws<InvalidOperationException>(() => nullComplexObject.TryGetPropertyValue("property", out propertyValue), "Cannot get property 'property' of a null EDM object of type '[NS.ComplexType Nullable=True]'."); }
public void GetEdmType_Returns_CtorInitializedValue() { IEdmComplexTypeReference edmType = new EdmComplexTypeReference(new EdmComplexType("NS", "ComplexType"), isNullable: true); NullEdmComplexObject nullComplexObject = new NullEdmComplexObject(edmType); IEdmTypeReference result = nullComplexObject.GetEdmType(); Assert.Same(edmType, result); }