Koan Annotations

Koan Annotations For Java

License

License

GroupId

GroupId

com.nicholaspaulsmith
ArtifactId

ArtifactId

koan-annotations
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

Koan Annotations
Koan Annotations For Java
Project URL

Project URL

https://github.com/SmiddyPence/koan-annotations
Source Code Management

Source Code Management

https://github.com/SmiddyPence/koan-annotations.git

Download koan-annotations

How to add to project

<!-- https://jarcasting.com/artifacts/com.nicholaspaulsmith/koan-annotations/ -->
<dependency>
    <groupId>com.nicholaspaulsmith</groupId>
    <artifactId>koan-annotations</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.nicholaspaulsmith/koan-annotations/
implementation 'com.nicholaspaulsmith:koan-annotations:1.0.0'
// https://jarcasting.com/artifacts/com.nicholaspaulsmith/koan-annotations/
implementation ("com.nicholaspaulsmith:koan-annotations:1.0.0")
'com.nicholaspaulsmith:koan-annotations:jar:1.0.0'
<dependency org="com.nicholaspaulsmith" name="koan-annotations" rev="1.0.0">
  <artifact name="koan-annotations" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.nicholaspaulsmith', module='koan-annotations', version='1.0.0')
)
libraryDependencies += "com.nicholaspaulsmith" % "koan-annotations" % "1.0.0"
[com.nicholaspaulsmith/koan-annotations "1.0.0"]

Dependencies

compile (2)

Group / Artifact Type Version
junit : junit jar 4.11
com.google.code.javaparser : javaparser jar 1.0.11

Project Modules

There are no modules declared in this project.

#Koan Annotations for Java (^_^)

This library offers a lightweight mechanism for creating Koan style learning exercises.

As an extension of JUnit the framework students can complete classes in their natural environment, the IDE.

Exercises are marked with the @Koan annotation and should have a learning objective documented in the methods Javadoc as well as a meaningful method name.

Koans are executed like unit tests within the in the IDE. A Koan implementation without a solution or an incorrect solution should fail - a JUnit red bar. After a student has meditated and provided the correct solution running the test should cause execution success - JUnit green bar.

Teachers should provide both a solution and problem file to the Koans they provide. Students can leverage the solutions or problems by marking a method with @Enlighten or @Vex. The framework will then amend the source code to either provide the solution or starting problem respectively.

Simple Example:

@RunWith(KoanRunner.class)
public class MyKoans {  

    /**
    * Meditate on making the product of two numbers.
    * Hint: You will need to use an arithmetic operator
    */
    @Koan
    public void makeTheProductOfIAndJ(){
        int i = 10;
        int j = 5;
        int product = 0;

        /* (@_@) Meditation starts here */
        
        /* (^_^) Enlightenment reached here */

        assertThat(product, is(50));
    }
}

More Information

Please see the wiki

Dependency

<dependency>
    <groupId>com.javakoan</groupId>
    <artifactId>koan-annotations</artifactId>
    <version>1.0.3</version>
</dependency>

Example Uses

github.com/JavaKoan/java-koans

github.com/SmiddyPence/neo4j-tutorial

Status

Build Status

Versions

Version
1.0.0