public void CreatedDirectionNode2() { string filename = @"Content\FireDirection.xml"; BulletPattern pattern = new BulletPattern(); pattern.ParseXML(filename); ActionNode testActionNode = pattern.RootNode.GetChild(ENodeName.action) as ActionNode; FireNode testFireNode = testActionNode.GetChild(ENodeName.fire) as FireNode; Assert.IsNotNull(testFireNode.GetChild(ENodeName.direction)); Assert.IsNotNull(testFireNode.GetChild(ENodeName.direction) as DirectionNode); }
public void CreatedDirectionNode2() { var filename = new Filename(@"FireDirection.xml"); BulletPattern pattern = new BulletPattern(); pattern.ParseXML(filename.File); ActionNode testActionNode = pattern.RootNode.GetChild(ENodeName.action) as ActionNode; FireNode testFireNode = testActionNode.GetChild(ENodeName.fire) as FireNode; Assert.IsNotNull(testFireNode.GetChild(ENodeName.direction)); Assert.IsNotNull(testFireNode.GetChild(ENodeName.direction) as DirectionNode); }
public void DirectionNodeSequence() { string filename = @"Content\FireDirectionSequence.xml"; BulletPattern pattern = new BulletPattern(); pattern.ParseXML(filename); ActionNode testActionNode = pattern.RootNode.GetChild(ENodeName.action) as ActionNode; FireNode testFireNode = testActionNode.GetChild(ENodeName.fire) as FireNode; DirectionNode testDirectionNode = testFireNode.GetChild(ENodeName.direction) as DirectionNode; Assert.AreEqual(ENodeType.sequence, testDirectionNode.NodeType); }
public void SpeedNodeSequence() { var filename = new Filename(@"FireSpeedSequence.xml"); BulletPattern pattern = new BulletPattern(); pattern.ParseXML(filename.File); ActionNode testActionNode = pattern.RootNode.GetChild(ENodeName.action) as ActionNode; FireNode testFireNode = testActionNode.GetChild(ENodeName.fire) as FireNode; SpeedNode testSpeedNode = testFireNode.GetChild(ENodeName.speed) as SpeedNode; Assert.AreEqual(ENodeType.sequence, testSpeedNode.NodeType); }
public void GotActionRefNode4() { string filename = @"Content\ActionRefEmpty.xml"; BulletPattern pattern = new BulletPattern(); pattern.ParseXML(filename); ActionNode testActionNode = pattern.RootNode.GetChild(ENodeName.action) as ActionNode; FireNode testFireNode = testActionNode.GetChild(ENodeName.fire) as FireNode; BulletNode testBulletNode = testFireNode.GetChild(ENodeName.bullet) as BulletNode; Assert.IsNotNull(testBulletNode.GetChild(ENodeName.actionRef) as ActionRefNode); }
public void GotActionRefNode3() { var filename = new Filename(@"ActionRefEmpty.xml"); BulletPattern pattern = new BulletPattern(); pattern.ParseXML(filename.File); ActionNode testActionNode = pattern.RootNode.GetChild(ENodeName.action) as ActionNode; FireNode testFireNode = testActionNode.GetChild(ENodeName.fire) as FireNode; BulletNode testBulletNode = testFireNode.GetChild(ENodeName.bullet) as BulletNode; Assert.IsNotNull(testBulletNode.GetChild(ENodeName.actionRef)); }
public void DirectionNodeAbsolute() { var filename = new Filename(@"FireDirectionAbsolute.xml"); BulletPattern pattern = new BulletPattern(); pattern.ParseXML(filename.File); ActionNode testActionNode = pattern.RootNode.GetChild(ENodeName.action) as ActionNode; FireNode testFireNode = testActionNode.GetChild(ENodeName.fire) as FireNode; DirectionNode testDirectionNode = testFireNode.GetChild(ENodeName.direction) as DirectionNode; Assert.AreEqual(ENodeType.absolute, testDirectionNode.NodeType); }
public void GotParamNode2() { string filename = @"Content\BulletRefParam.xml"; BulletPattern pattern = new BulletPattern(); pattern.ParseXML(filename); ActionNode testActionNode = pattern.RootNode.GetChild(ENodeName.action) as ActionNode; FireNode testFireNode = testActionNode.GetChild(ENodeName.fire) as FireNode; BulletRefNode refNode = testFireNode.GetChild(ENodeName.bulletRef) as BulletRefNode; Assert.IsNotNull(refNode.GetChild(ENodeName.param) as ParamNode); }
public void SpeedNodeAbsolute() { string filename = @"Content\FireSpeedAbsolute.xml"; BulletPattern pattern = new BulletPattern(); pattern.ParseXML(filename); ActionNode testActionNode = pattern.RootNode.GetChild(ENodeName.action) as ActionNode; FireNode testFireNode = testActionNode.GetChild(ENodeName.fire) as FireNode; SpeedNode testSpeedNode = testFireNode.GetChild(ENodeName.speed) as SpeedNode; Assert.AreEqual(ENodeType.absolute, testSpeedNode.NodeType); }
public void GotParamNode2() { var filename = TestUtils.GetFilePath(@"Content\BulletRefParam.xml"); BulletPattern pattern = new BulletPattern(); pattern.Parse(filename); ActionNode testActionNode = pattern.RootNode.GetChild(NodeName.action) as ActionNode; FireNode testFireNode = testActionNode.GetChild(NodeName.fire) as FireNode; BulletRefNode refNode = testFireNode.GetChild(NodeName.bulletRef) as BulletRefNode; Assert.IsNotNull(refNode.GetChild(NodeName.param) as ParamNode); }
public void FoundBulletNode1() { var filename = new Filename(@"BulletRef.xml"); BulletPattern pattern = new BulletPattern(); pattern.ParseXML(filename.File); ActionNode testActionNode = pattern.RootNode.GetChild(ENodeName.action) as ActionNode; FireNode testFireNode = testActionNode.GetChild(ENodeName.fire) as FireNode; BulletRefNode refNode = testFireNode.GetChild(ENodeName.bulletRef) as BulletRefNode; Assert.IsNotNull(refNode.ReferencedBulletNode as BulletNode); }
public void FoundCorrectBulletNode() { string filename = @"Content\BulletRefTwoBullets.xml"; BulletPattern pattern = new BulletPattern(); pattern.ParseXML(filename); ActionNode testActionNode = pattern.RootNode.GetChild(ENodeName.action) as ActionNode; FireNode testFireNode = testActionNode.GetChild(ENodeName.fire) as FireNode; BulletRefNode refNode = testFireNode.GetChild(ENodeName.bulletRef) as BulletRefNode; BulletNode testBulletNode = refNode.ReferencedBulletNode as BulletNode; Assert.AreEqual("test2", testBulletNode.Label); }
public void FoundActionNode2() { string filename = @"Content\ActionRefEmpty.xml"; BulletPattern pattern = new BulletPattern(); pattern.ParseXML(filename); ActionNode testActionNode = pattern.RootNode.GetChild(ENodeName.action) as ActionNode; FireNode testFireNode = testActionNode.GetChild(ENodeName.fire) as FireNode; BulletNode testBulletNode = testFireNode.GetChild(ENodeName.bullet) as BulletNode; ActionRefNode testActionRefNode = testBulletNode.GetChild(ENodeName.actionRef) as ActionRefNode; ActionNode refNode = testActionRefNode.ReferencedActionNode as ActionNode; Assert.AreEqual(refNode.Label, "test"); }
public void FoundCorrectActionNode() { var filename = new Filename(@"ActionRefParam.xml"); BulletPattern pattern = new BulletPattern(); pattern.ParseXML(filename.File); ActionNode testActionNode = pattern.RootNode.GetChild(ENodeName.action) as ActionNode; FireNode testFireNode = testActionNode.GetChild(ENodeName.fire) as FireNode; BulletNode testBulletNode = testFireNode.GetChild(ENodeName.bullet) as BulletNode; ActionRefNode testActionRefNode = testBulletNode.GetChild(ENodeName.actionRef) as ActionRefNode; ActionNode refNode = testActionRefNode.ReferencedActionNode as ActionNode; Assert.AreEqual(refNode.Label, "test2"); }
public void FoundCorrectActionNode() { var filename = TestUtils.GetFilePath(@"Content\ActionRefParam.xml"); BulletPattern pattern = new BulletPattern(); pattern.Parse(filename); ActionNode testActionNode = pattern.RootNode.GetChild(NodeName.action) as ActionNode; Assert.IsNotNull(testActionNode); FireNode testFireNode = testActionNode.GetChild(NodeName.fire) as FireNode; Assert.IsNotNull(testFireNode); BulletNode testBulletNode = testFireNode.GetChild(NodeName.bullet) as BulletNode; Assert.IsNotNull(testBulletNode); ActionRefNode testActionRefNode = testBulletNode.GetChild(NodeName.actionRef) as ActionRefNode; Assert.IsNotNull(testActionRefNode); ActionNode refNode = testActionRefNode.ReferencedActionNode; Assert.IsNotNull(testActionNode); Assert.AreEqual("test2", refNode.Label); }