public void CustomUriLiteralPrefix_GetNotExistingPrefix()
        {
            const string NOT_EXISTING_PREFIX_NAME = "NOT_EXISTING_PREFIX_NAME";

            IEdmTypeReference edmType =
                CustomUriLiteralPrefixes.GetEdmTypeByCustomLiteralPrefix(NOT_EXISTING_PREFIX_NAME);

            edmType.Should().BeNull();
        }
        public void CustomUriLiteralPrefix_CanAddLiteralPrefixNameOfBuiltInLiteral()
        {
            const string EXISITING_BUILTIN_LITERAL_NAME = "geometry";

            try
            {
                IEdmTypeReference first_booleanTypeReference = EdmCoreModel.Instance.GetBoolean(false);
                CustomUriLiteralPrefixes.AddCustomLiteralPrefix(EXISITING_BUILTIN_LITERAL_NAME, first_booleanTypeReference);

                CustomUriLiteralPrefixes.GetEdmTypeByCustomLiteralPrefix(EXISITING_BUILTIN_LITERAL_NAME).IsEquivalentTo(first_booleanTypeReference).Should().BeTrue();
            }
            finally
            {
                CustomUriLiteralPrefixes.RemoveCustomLiteralPrefix(EXISITING_BUILTIN_LITERAL_NAME).Should().BeTrue();
            }
        }
        public void CustomUriLiteralPrefix_CanAddDifferentPrefixNameWithExistingEdmTypeWith()
        {
            const string FIRST_LITERAL_PREFIX  = "myFirstCustomLiteralPrefix";
            const string SECOND_LITERAL_PREFIX = "mySecondCustomLiteralPrefix";

            try
            {
                IEdmTypeReference booleanTypeReference = EdmCoreModel.Instance.GetBoolean(false);
                CustomUriLiteralPrefixes.AddCustomLiteralPrefix(FIRST_LITERAL_PREFIX, booleanTypeReference);

                CustomUriLiteralPrefixes.AddCustomLiteralPrefix(SECOND_LITERAL_PREFIX, booleanTypeReference);

                CustomUriLiteralPrefixes.GetEdmTypeByCustomLiteralPrefix(FIRST_LITERAL_PREFIX).IsEquivalentTo(booleanTypeReference).Should().BeTrue();
                CustomUriLiteralPrefixes.GetEdmTypeByCustomLiteralPrefix(SECOND_LITERAL_PREFIX).IsEquivalentTo(booleanTypeReference).Should().BeTrue();
            }
            finally
            {
                CustomUriLiteralPrefixes.RemoveCustomLiteralPrefix(FIRST_LITERAL_PREFIX).Should().BeTrue();
                CustomUriLiteralPrefixes.RemoveCustomLiteralPrefix(SECOND_LITERAL_PREFIX).Should().BeTrue();
            }
        }
        public void CustomUriLiteralPrefix_CanAddDifferentPrefixNameWithDifferentEdmTypeWith()
        {
            const string FIRST_LITERAL_PREFIX  = "myFirstCustomLiteralPrefix";
            const string SECOND_LITERAL_PREFIX = "mySecondCustomLiteralPrefix";

            try
            {
                IEdmTypeReference first_booleanTypeReference = EdmCoreModel.Instance.GetBoolean(false);
                CustomUriLiteralPrefixes.AddCustomLiteralPrefix(FIRST_LITERAL_PREFIX, first_booleanTypeReference);

                IEdmTypeReference second_stringTypeReference = EdmCoreModel.Instance.GetString(false);
                CustomUriLiteralPrefixes.AddCustomLiteralPrefix(SECOND_LITERAL_PREFIX, second_stringTypeReference);

                Assert.True(CustomUriLiteralPrefixes.GetEdmTypeByCustomLiteralPrefix(FIRST_LITERAL_PREFIX).IsEquivalentTo(first_booleanTypeReference));
                Assert.True(CustomUriLiteralPrefixes.GetEdmTypeByCustomLiteralPrefix(SECOND_LITERAL_PREFIX).IsEquivalentTo(second_stringTypeReference));
            }
            finally
            {
                Assert.True(CustomUriLiteralPrefixes.RemoveCustomLiteralPrefix(FIRST_LITERAL_PREFIX));
                Assert.True(CustomUriLiteralPrefixes.RemoveCustomLiteralPrefix(SECOND_LITERAL_PREFIX));
            }
        }