public void ExtraGeneTest() { Guid id1 = Guid.NewGuid(); Organism organism1 = new Organism(id1, _trainingRoom.TrainingRoomSettings, 0, new List <ConnectionGene>() { new ConnectionGene(id1, 1, 0, 3, 1), new ConnectionGene(id1, 2, 1, 3, 1, false), new ConnectionGene(id1, 3, 2, 3, 1), new ConnectionGene(id1, 4, 1, 4, 1), new ConnectionGene(id1, 5, 4, 3, 1), new ConnectionGene(id1, 8, 0, 4, 1) }); Guid id2 = Guid.NewGuid(); Organism organism2 = new Organism(id2, _trainingRoom.TrainingRoomSettings, 0, new List <ConnectionGene>() { new ConnectionGene(id2, 1, 0, 3, 1), new ConnectionGene(id2, 2, 1, 3, 1, false), new ConnectionGene(id2, 3, 2, 3, 1), new ConnectionGene(id2, 4, 1, 4, 1), new ConnectionGene(id2, 5, 4, 3, 1), new ConnectionGene(id2, 8, 0, 4, 1), new ConnectionGene(id2, 9, 0, 2, 1) }); Assert.IsFalse(organism1.Equals(organism2)); }
public void DifferentTypeTest(object other) { Guid id = Guid.NewGuid(); Organism organism1 = new Organism(id, _trainingRoom.TrainingRoomSettings, 0, new List <ConnectionGene>() { new ConnectionGene(id, 1, 0, 3, 1), new ConnectionGene(id, 2, 1, 3, 1, false), new ConnectionGene(id, 3, 2, 3, 1), new ConnectionGene(id, 4, 1, 4, 1), new ConnectionGene(id, 5, 4, 3, 1), new ConnectionGene(id, 8, 0, 4, 1) }); Assert.IsFalse(organism1.Equals(other)); }
public void CloneTest() { Organism clone = _original.Clone(_trainingRoom.TrainingRoomSettings); Assert.IsTrue(clone.Equals(_original)); }