示例#1
0
        public void RejectsIfBothBulletAndBulletRefAreDefined()
        {
            string filename = @"Content\Invalid\InvalidFireElement2.xml";
            var    thrown   = Assert.Throws <InvalidBulletPatternException>(delegate
            {
                BulletPattern.FromFile(filename);
            });

            Assert.IsInstanceOf <XmlSchemaValidationException>(thrown.InnerException);
        }
示例#2
0
        public void RequiresBulletOrBulletRefInFireElement()
        {
            string filename = @"Content\Invalid\InvalidFireElement.xml";
            var    thrown   = Assert.Throws <InvalidBulletPatternException>(delegate
            {
                BulletPattern.FromFile(filename);
            });

            Assert.IsInstanceOf <XmlSchemaValidationException>(thrown.InnerException);
        }
示例#3
0
 public void AcceptsFireElementWithoutDirectionOrSpeed()
 {
     BulletPattern.FromFile(@"Content\FireEmpty.xml");
     BulletPattern.FromFile(@"Content\FireElementJustSpeed.xml");
     BulletPattern.FromFile(@"Content\FireElementJustDirection.xml");
 }
示例#4
0
        public void AcceptsChildNodesInAnyOrderInFireElement()
        {
            string filename = @"Content\UnorderedFireElement.xml";

            BulletPattern.FromFile(filename);
        }