示例#1
0
        public void ValidatingSerializationInfoShouldThrowIfBaseTypeNameNotSet()
        {
            Action action = () => ODataFeedAndEntrySerializationInfo.Validate(new ODataFeedAndEntrySerializationInfo {
                NavigationSourceName = "Set"
            });

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