public void RejectsIfBothBulletAndBulletRefAreDefined() { string filename = @"Content\Invalid\InvalidFireElement2.xml"; var thrown = Assert.Throws <InvalidBulletPatternException>(delegate { BulletPattern.FromFile(filename); }); Assert.IsInstanceOf <XmlSchemaValidationException>(thrown.InnerException); }
public void RequiresBulletOrBulletRefInFireElement() { string filename = @"Content\Invalid\InvalidFireElement.xml"; var thrown = Assert.Throws <InvalidBulletPatternException>(delegate { BulletPattern.FromFile(filename); }); Assert.IsInstanceOf <XmlSchemaValidationException>(thrown.InnerException); }
public void AcceptsFireElementWithoutDirectionOrSpeed() { BulletPattern.FromFile(@"Content\FireEmpty.xml"); BulletPattern.FromFile(@"Content\FireElementJustSpeed.xml"); BulletPattern.FromFile(@"Content\FireElementJustDirection.xml"); }
public void AcceptsChildNodesInAnyOrderInFireElement() { string filename = @"Content\UnorderedFireElement.xml"; BulletPattern.FromFile(filename); }