Skip to content

Instantly share code, notes, and snippets.

@greghelton
Created December 26, 2011 20:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save greghelton/1522052 to your computer and use it in GitHub Desktop.
Save greghelton/1522052 to your computer and use it in GitHub Desktop.
ANT build file for the Mockito Example
<project name="programmable" basedir="." default="test">
<property name="src.dir" location="src"/>
<property name="bin.dir" location="bin"/>
<property name="lib.dir" location="lib"/>
<property name="junit" value="${lib.dir}/junit"/>
<property name="mockito" value="${lib.dir}/mockito"/>
<path id="classpath">
<pathelement location="${bin.dir}"/>
<fileset dir="${junit}" includes="**/*.jar"/>
<fileset dir="${mockito}" includes="**/*.jar"/>
</path>
<target name="clean">
<delete dir="${bin.dir}"/>
</target>
<target name="init" depends="clean">
<mkdir dir="${bin.dir}"/>
</target>
<target name="compile" depends="init">
<javac srcdir="${src.dir}"
destdir="${bin.dir}"
classpathref="classpath"
includeAntRuntime="yes"/>
</target>
<target name="test" depends="compile">
<junit fork="yes" printsummary="yes">
<classpath refid="classpath"/>
<formatter type="plain" usefile="false"/>
<test name="us.home.electronics.ProgrammableTest"/>
</junit>
</target>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment