public override bool Parse(MockParser parser)
        {
            if (!base.Parse(parser))
            {
                return(false);
            }

            parser.Parse(new MockAttribute <Attribute>(Attribute.MockAttribute));

            Assert.AreEqual(1, Attributes.Count, "CheckAttribute, attribute count");
            Assert.IsTrue(parser.CheckAttribute(Attribute.MockAttribute, true, false), "CheckAttribute() returns condition (true)");
            Assert.IsTrue(Attributes[0].Valid, "CheckAttribute, attribute not invalidated");
            Assert.IsFalse(parser.CheckAttribute(Attribute.MockAttribute, false, false), "CheckAttribute() returns condition (false)");;
            Assert.IsFalse(Attributes[0].Valid, "CheckAttribute, attribute invalidated");
            Assert.IsTrue(this.Valid, "CheckAttribute, header not invalidated");

            return(this.Valid);
        }
コード例 #2
0
 public void TestParseCompositeAttributeDisposed()
 {
     _parser.Dispose();
     _parser.Parse <string, int>(new MockAttribute <string>("Mock"));
 }