コード例 #1
0
        public void KindPropertyReturnsKeyAsSegmentSupportedEnumMember()
        {
            // Arrange & Act
            KeyAsSegmentSupported keyAsSegment = new KeyAsSegmentSupported();

            // Assert
            Assert.Equal(CapabilitesTermKind.KeyAsSegmentSupported, keyAsSegment.Kind);
        }
コード例 #2
0
        public void UnknownAnnotatableTargetReturnsDefaultTopSupportedValues()
        {
            // Arrange
            KeyAsSegmentSupported keyAsSegment = new KeyAsSegmentSupported();
            EdmEntityType         entityType   = new EdmEntityType("NS", "Entity");

            //  Act
            bool result = keyAsSegment.Load(EdmCoreModel.Instance, entityType);

            // Assert
            Assert.False(result);
            Assert.True(keyAsSegment.IsSupported);
            Assert.Null(keyAsSegment.Supported);
        }
コード例 #3
0
        public void EntitySetContainerReturnsCorrectKeyAsSegmentSupportedValue(EdmVocabularyAnnotationSerializationLocation location, bool support)
        {
            // Arrange
            IEdmModel model = GetEdmModel(location, support);

            Assert.NotNull(model); // guard

            // Act
            KeyAsSegmentSupported KeyAsSegmentSupported = new KeyAsSegmentSupported();
            bool result = KeyAsSegmentSupported.Load(model, model.EntityContainer);

            // Assert
            Assert.True(result);
            Assert.NotNull(KeyAsSegmentSupported.Supported);
            Assert.Equal(support, KeyAsSegmentSupported.Supported.Value);
        }