public void AddNoteMutation_Test() { Assert.AreEqual(1, mutationLog.NodeMutations.Count); mutationLog.AddNodeMutation(connection2, node2); Assert.AreEqual(2, mutationLog.NodeMutations.Count); Assert.True(mutationLog.NodeMutations.ContainsKey(2)); Assert.AreEqual(2, mutationLog.NodeMutations[2][0]); }
public void SetUp() { mutationLog = new MutationLog(); node1 = new NodeGene(1, NodeGeneType.HIDDEN, 0.5f); node2 = new NodeGene(2, NodeGeneType.OUTPUT, 1f); connection1 = new ConnectionGene(1, 2, 0.5f, true, 1); connection2 = new ConnectionGene(2, 1, 1f, false, 2); mutationLog.AddConnectionMutation(connection1); mutationLog.AddNodeMutation(connection1, node1); }