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 ); }
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 ); }