Beispiel #1
0
        public void KindPropertyReturnsBatchSupportedEnumMember()
        {
            // Arrange & Act
            BatchSupported batch = new BatchSupported();

            // Assert
            Assert.Equal(CapabilitesTermKind.BatchSupported, batch.Kind);
        }
Beispiel #2
0
        public void UnknownAnnotatableTargetReturnsDefaultBatchSupportedValues()
        {
            // Arrange
            BatchSupported batch      = new BatchSupported();
            EdmEntityType  entityType = new EdmEntityType("NS", "Entity");

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

            // Assert
            Assert.False(result);
            Assert.True(batch.IsSupported);
            Assert.Null(batch.Supported);
        }
Beispiel #3
0
        public void EntitySetContainerReturnsCorrectBatchSupportedValue(EdmVocabularyAnnotationSerializationLocation location, bool support)
        {
            // Arrange
            IEdmModel model = GetEdmModel(location, support);

            Assert.NotNull(model); // guard

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

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