From 44328157ea6378907c87a8005ae3d7194698e769 Mon Sep 17 00:00:00 2001 From: Fabian Becker Date: Fri, 25 Jan 2013 13:46:16 +0000 Subject: [PATCH] Implemented Maven jar-with-dependencies build Added some @Override annotations Removed buggy test cases. refs #8 --- pom.xml | 27 +++++++++++++++++-- .../go/individuals/AbstractEAIndividual.java | 2 ++ .../go/operators/mutation/MutateGANBit.java | 2 +- test/eva2/tools/SerializerTest.java | 19 +------------ 4 files changed, 29 insertions(+), 21 deletions(-) diff --git a/pom.xml b/pom.xml index d95809e0..93beea1e 100644 --- a/pom.xml +++ b/pom.xml @@ -68,9 +68,32 @@ maven-compiler-plugin 2.3.2 - 1.6 - 1.6 + 1.7 + 1.7 + + + org.apache.maven.plugins + maven-assembly-plugin + 2.2-beta-4 + + + jar-with-dependencies + + + + eva2.client.EvAClient + + + + + + package + + single + + + diff --git a/src/eva2/server/go/individuals/AbstractEAIndividual.java b/src/eva2/server/go/individuals/AbstractEAIndividual.java index 9939763d..025182a3 100644 --- a/src/eva2/server/go/individuals/AbstractEAIndividual.java +++ b/src/eva2/server/go/individuals/AbstractEAIndividual.java @@ -178,6 +178,7 @@ public abstract class AbstractEAIndividual implements IndividualInterface, java. * @param obj The individual to compare to. * @return boolean if equal true else false */ + @Override public boolean equals(Object obj) { if (this == obj) { return true; @@ -272,6 +273,7 @@ public abstract class AbstractEAIndividual implements IndividualInterface, java. * Returns a hash code value for the object. This method is supported for * the benefit of hashtables such as those provided by java.util.Hashtable */ + @Override public int hashCode() { String t = AbstractEAIndividual.getDefaultStringRepresentation(this); return t.hashCode(); diff --git a/src/eva2/server/go/operators/mutation/MutateGANBit.java b/src/eva2/server/go/operators/mutation/MutateGANBit.java index 1e3e3620..1987c3bd 100644 --- a/src/eva2/server/go/operators/mutation/MutateGANBit.java +++ b/src/eva2/server/go/operators/mutation/MutateGANBit.java @@ -103,7 +103,7 @@ public class MutateGANBit implements InterfaceMutation, java.io.Serializable { */ @Override public String getStringRepresentation() { - return "GA n-Bit mutation"; + return "GA n-Bit mutation (n="+this.numberOfMutations+")"; } /** diff --git a/test/eva2/tools/SerializerTest.java b/test/eva2/tools/SerializerTest.java index e90b64c8..aaf53f56 100644 --- a/test/eva2/tools/SerializerTest.java +++ b/test/eva2/tools/SerializerTest.java @@ -75,7 +75,7 @@ public class SerializerTest { Serializable s = null; Serializer.storeObject(outStream, s); // TODO review the generated test code and remove the default call to fail. - fail("The test case is a prototype."); + //fail("The test case is a prototype."); } /** @@ -88,23 +88,6 @@ public class SerializerTest { Object expResult = null; Object result = Serializer.loadObject(inputStream); assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - fail("The test case is a prototype."); - } - - /** - * Test of loadObject method, of class Serializer. - */ - @Test - public void testLoadObject_InputStream_boolean() { - System.out.println("loadObject"); - InputStream inputStream = null; - boolean casually = false; - Object expResult = null; - Object result = Serializer.loadObject(inputStream, casually); - assertEquals(expResult, result); - // TODO review the generated test code and remove the default call to fail. - fail("The test case is a prototype."); } }