public void AreConditionsMet_DoesntUpdateNodeWhenNotAttempting() { Conversation testConvo = new Conversation(); this.LoadConversationFromFile(DialogueFiles.SimpleConversation, ref testConvo); testConvo.JumpToNode(DialogueFiles.SimpleNodeNonEligibleNode); // Test that conditions are met for the node, should be false. ConversationEngine.AreConditionsMet(testConvo.CurrentNode); Assert.IsNull(testConvo.CurrentNode.IsEnabled); }
public void AreConditionsMet_FalseConditionsFail() { // Load the conversation, and jump to a useful node for us to test. Conversation testConvo = new Conversation(); this.LoadConversationFromFile(DialogueFiles.SimpleConversation, ref testConvo); testConvo.JumpToNode(DialogueFiles.SimpleNodeNonEligibleNode); // Test that conditions are met for the node, should be false. bool conditionsMet = ConversationEngine.AreConditionsMet(testConvo.CurrentNode); Assert.IsFalse(conditionsMet); }