예제 #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");
        }
예제 #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");
        }