Exemple #1
0
        public void ValidateWhenUrlAndSettingAnnotationBuilderNotSetIndicatesMetadataHasNoAnnotation()
        {
            var metadataSimulator        = new DataServiceProviderSimulator();
            var dataServiceConfiguration = new DataServiceConfiguration(metadataSimulator);

            Assert.IsFalse(dataServiceConfiguration.HasAnnotations());
        }
Exemple #2
0
        public void ValidateSettingAnnotationBuilderIndicatesMetadataHasAnnotation()
        {
            var metadataSimulator        = new DataServiceProviderSimulator();
            var dataServiceConfiguration = new DataServiceConfiguration(metadataSimulator);

            dataServiceConfiguration.AnnotationsBuilder = (IEdmModel model) => new IEdmModel[] { model };
            Assert.IsTrue(dataServiceConfiguration.HasAnnotations());
        }
Exemple #3
0
        public void ValidateGenerateKeyAsSegmentIndicatesMetadataHasAnnotation()
        {
            var metadataSimulator        = new DataServiceProviderSimulator();
            var dataServiceConfiguration = new DataServiceConfiguration(metadataSimulator);

            dataServiceConfiguration.DataServiceBehavior.UrlKeyDelimiter = DataServiceUrlKeyDelimiter.Slash;
            Assert.IsTrue(dataServiceConfiguration.HasAnnotations());
        }