public void ValidatingSerializationInfoShouldThrowIfBaseTypeNameNotSet() { Action action = () => ODataFeedAndEntrySerializationInfo.Validate(new ODataFeedAndEntrySerializationInfo { NavigationSourceName = "Set" }); action.ShouldThrow <ArgumentNullException>().WithMessage("serializationInfo.NavigationSourceEntityTypeName", ComparisonMode.Substring); }
public void ValdatingSerializationInfoShouldAllowIfEntitySetNameNotSetWithEdmUnknownEntitySet() { ODataFeedAndEntrySerializationInfo.Validate(new ODataFeedAndEntrySerializationInfo() { ExpectedTypeName = "NS.Type", IsFromCollection = true, NavigationSourceEntityTypeName = "NS.Type", NavigationSourceKind = EdmNavigationSourceKind.UnknownEntitySet, NavigationSourceName = null }); }
public void ValidatingSerializationInfoShouldAllowExpectedTypeNameNotSet() { ODataFeedAndEntrySerializationInfo.Validate(new ODataFeedAndEntrySerializationInfo { NavigationSourceName = "Set", NavigationSourceEntityTypeName = "EntitySetElementTypeName" }).Should().NotBeNull(); }
public void ValidateNullSerializationInfoShouldReturnNull() { ODataFeedAndEntrySerializationInfo.Validate(null).Should().BeNull(); }