// Path: MetaHeuristics4Java/src/main/java/de/mh4j/util/Comparable.java
// public interface Comparable<T> extends java.lang.Comparable<T> {
// 
//     static final int LOWER = -1;
//     static final int EQUAL = 0;
//     static final int GREATER = 1;
// 
// }


import org.testng.annotations.Test;
import de.mh4j.util.Comparable;
package de.mh4j.solver.genetic;



public class GenomeTest {

    @Test
    public void testGetBirthGeneration_WhenInitialized_BirthGenerationIsUnset() throws Exception {
        Genome genome = new GenomeMock();
        assert genome.getBirthGeneration() == Genome.NO_BIRTH_GENERATION_ASSOCIATED;
    }

    @Test
    public void testSetBirthGeneration() throws Exception {
        final int birthGeneration = 42;

        Genome genome = new GenomeMock();
        genome.setBirthGeneration(birthGeneration);

        assert genome.getBirthGeneration() == birthGeneration;
    }

    @Test
    public void testCompareGenomes() {
        Genome badGenome = new GenomeMock(20);
        Genome goodGenome = new GenomeMock(40);

// Path: MetaHeuristics4Java/src/main/java/de/mh4j/util/Comparable.java
// public interface Comparable<T> extends java.lang.Comparable<T> {
// 
//     static final int LOWER = -1;
//     static final int EQUAL = 0;
//     static final int GREATER = 1;
// 
// }


// Path: MetaHeuristics4Java/src/test/java/de/mh4j/solver/genetic/GenomeTest.java
import org.testng.annotations.Test;
import de.mh4j.util.Comparable;

package de.mh4j.solver.genetic;



public class GenomeTest {

    @Test
    public void testGetBirthGeneration_WhenInitialized_BirthGenerationIsUnset() throws Exception {
        Genome genome = new GenomeMock();
        assert genome.getBirthGeneration() == Genome.NO_BIRTH_GENERATION_ASSOCIATED;
    }

    @Test
    public void testSetBirthGeneration() throws Exception {
        final int birthGeneration = 42;

        Genome genome = new GenomeMock();
        genome.setBirthGeneration(birthGeneration);

        assert genome.getBirthGeneration() == birthGeneration;
    }

    @Test
    public void testCompareGenomes() {
        Genome badGenome = new GenomeMock(20);
        Genome goodGenome = new GenomeMock(40);

        assert badGenome.compareTo(goodGenome) == Comparable.LOWER : "Bad genome should be worse than better genome";