Exemplo n.º 1
0
        public void TestGuidConstant()
        {
            var constant = new EdmGuidConstant(new Guid());

            Assert.AreEqual(EdmValueKind.Guid, constant.ValueKind, "Invalid value kind.");

            this.ValidateEdmValueKindRoundTrip(EdmValueKind.Guid, EdmCoreModel.Instance.GetGuid(true), constant);
        }
Exemplo n.º 2
0
        public void BuildEdmExpression_Works_ForGuidValue()
        {
            // Arrange
            IEdmType edmType = EdmCoreModel.Instance.GetPrimitiveType(EdmPrimitiveTypeKind.Guid);

            // Act
            IEdmExpression exp = IEdmTermExtensions.BuildEdmExpression(edmType, "21EC2020-3AEA-1069-A2DD-08002B30309D");

            // Assert
            Assert.NotNull(exp);
            EdmGuidConstant constant = Assert.IsType <EdmGuidConstant>(exp);

            Assert.Equal("21EC2020-3AEA-1069-A2DD-08002B30309D".ToLowerInvariant(), constant.Value.ToString());
        }