public void EnableEnumPrefixFree_Sets_EnumPrefixFreeFlag()
        {
            // Arrange
            HttpConfiguration config = new HttpConfiguration();

            // Act
            config.EnableEnumPrefixFree(enumPrefixFree: true);
            ODataUriResolverSetttings resolverSetttings = config.GetResolverSettings();

            // Assert
            Assert.True(resolverSetttings.EnumPrefixFree);
        }
        public void EnableUnqualifedCall_Sets_UnqualifedCallFlag()
        {
            // Arrange
            HttpConfiguration config = new HttpConfiguration();

            // Act
            config.EnableUnqualifiedNameCall(unqualifiedNameCall: true);
            ODataUriResolverSetttings resolverSetttings = config.GetResolverSettings();

            // Assert
            Assert.True(resolverSetttings.UnqualifiedNameCall);
        }
        public void EnableCaseInsensitive_Sets_KeyWordAndMetadataFlag()
        {
            // Arrange
            HttpConfiguration config = new HttpConfiguration();

            // Act
            config.EnableCaseInsensitive(caseInsensitive: true);
            ODataUriResolverSetttings resolverSetttings = config.GetResolverSettings();

            // Assert
            Assert.True(resolverSetttings.CaseInsensitive);
        }
Example #4
0
        public void EnableAlternateKeys_Sets_AlternateKeyFlag()
        {
            // Arrange
            HttpConfiguration config = new HttpConfiguration();

            // Act
            config.EnableAlternateKeys(true);
            ODataUriResolverSetttings resolverSetttings = config.GetResolverSettings();

            // Assert
            Assert.True(resolverSetttings.AlternateKeys);
        }
        public void GetResolverSettings_ReturnDefaultResolverSettings_IfNotSet()
        {
            // Arrange
            HttpConfiguration config = new HttpConfiguration();

            // Act
            ODataUriResolverSetttings resolverSetttings = config.GetResolverSettings();

            // Assert
            Assert.False(resolverSetttings.CaseInsensitive);
            Assert.False(resolverSetttings.UnqualifiedNameCall);
            Assert.False(resolverSetttings.EnumPrefixFree);
        }