Exemplo n.º 1
0
        public void XElementAnnotationTestSetNullAnnotationNameModel()
        {
            try
            {
                SetNullAnnotationNameModel();
                Assert.Fail("exception expected");
            }
            catch (ArgumentNullException)
            {
            }

            var errors = new MutableDirectValueAnnotation().Errors().ToArray();

            Assert.AreEqual(3, errors.Length, "error count");
            Assert.AreEqual(EdmErrorCode.InterfaceCriticalPropertyValueMustNotBeNull, errors.Select(e => e.ErrorCode).Distinct().Single(), "InterfaceCriticalPropertyValueMustNotBeNull");
        }
Exemplo n.º 2
0
        public void XElementAnnotationTestSetNullAnnotationNameModel()
        {
            try
            {
                SetNullAnnotationNameModel();
                Assert.Fail("exception exptected");
            }
            catch (ArgumentNullException)
            {
            }

            var errors = new MutableDirectValueAnnotation().Errors().ToArray();
            Assert.AreEqual(3, errors.Length, "error count");
            Assert.AreEqual(EdmErrorCode.InterfaceCriticalPropertyValueMustNotBeNull, errors.Select(e => e.ErrorCode).Distinct().Single(), "InterfaceCriticalPropertyValueMustNotBeNull");
        }