コード例 #1
0
        public void TestParseInvalidSingleMultiplicityNotAtomic()
        {
            const string attIdentifier = "link";

            var e = Assert.Catch(() => {
                LinkAttributeParser.ParseMultiplicity(attIdentifier, (ParsedElement) new NParsedAttributeColon());
            });

            Assert.IsInstanceOf(typeof(InvalidParameterAttributeException), e);
            StringAssert.AreEqualIgnoringCase(
                string.Format(InvalidParameterAttributeException.ATOMIC_ONLY, attIdentifier),
                e.Message
                );
        }
コード例 #2
0
        public void TestParseInvalidSingleMultiplicityName()
        {
            const string attIdentifier = "link";

            var e = Assert.Catch(() => {
                LinkAttributeParser.ParseMultiplicity(attIdentifier, new NParsedAttributeAtomic(new NameExpression("test")));
            });

            Assert.IsInstanceOf(typeof(InvalidParameterAttributeException), e);
            StringAssert.AreEqualIgnoringCase(
                string.Format(InvalidParameterAttributeException.INVALID_VALUE, attIdentifier),
                e.Message
                );
        }