Skip to content

Commit b376174

Browse files
committed
massive refactoring! koans runner and framework have been refactored into their own jar, added intelegient batch/shell invocation of runner (lots of work to do there) - still have some of the more frivolous tests failing, get to them soon
0 parents  commit b376174

164 files changed

Lines changed: 4292 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎koans-lib/.classpath‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
5+
<classpathentry kind="output" path="bin"/>
6+
</classpath>

‎koans-lib/.project‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>koans-lib</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
</buildSpec>
14+
<natures>
15+
<nature>org.eclipse.jdt.core.javanature</nature>
16+
</natures>
17+
</projectDescription>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#Sun Mar 13 16:07:23 EDT 2011
2+
eclipse.preferences.version=1
3+
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
4+
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
5+
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
6+
org.eclipse.jdt.core.compiler.compliance=1.6
7+
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
8+
org.eclipse.jdt.core.compiler.debug.localVariable=generate
9+
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
10+
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
11+
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
12+
org.eclipse.jdt.core.compiler.source=1.6

‎koans-lib/MANIFEST.MF‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Manifest-Version: 1.0
2+
Class-Path: . ../bin/temp.jar
3+
Main-Class: com.sandwich.koan.runner.KoanSuiteRunner
4+
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
<?xml version="1.0" encoding="ISO-8859-1"?>
2+
<Packages>
3+
<Package pkg="beginner" name="Beginner">
4+
<!--
5+
TODO: AboutKoans...
6+
-->
7+
<Suite class="AboutAssertions">
8+
<Koan name="assertBooleanTrue"
9+
lesson="The __ are an attempt to communicate the need to fill in an answer. Judging by context, what should __ be replaced with?"/>
10+
<Koan name="assertBooleanFalse"
11+
lesson="Like the prior koan. Ponder if you will, the power of simple assertions when verifying an object's behavior."/>
12+
<!-- TODO introduce instantiation, constructors -->
13+
<Koan name="assertNullObject"
14+
lesson="A keyword in java to represent an unitialized reference is 'null'. There are times when something should be null, and this assertion can prove that."/>
15+
<Koan name="assertNotNullObject"
16+
lesson="Sometimes you merely wish to assert an object is not null. This assertion should be used sparingly, often a more specific assertion is appropriate."/>
17+
<!-- TODO explain arguments (mention they've been used in prior koans) -->
18+
<Koan name="assertEqualsWithDescriptiveMessage"
19+
lesson="Like the prior assertions, only this one invokes equals method on the 2nd to last argument, in this case, 1. This will blow up if the last two arguments are not .equal(...)"/>
20+
<!-- TODO finish explaining -->
21+
<Koan name="assertSameInstance"
22+
lesson="An object may equal another object, but it will never be the same as another object. Two references to the same object is not the same as two references to two equal objects."/>
23+
<Koan name="assertNotSameInstance"
24+
lesson="Notice the same instance has been reassigned. Both same and sameReference refer to the same Integer instance. If sameReference were a new Object() of any type [hint!] this would pass."/>
25+
<!-- TODO assertThatUsingMatcher" -->
26+
</Suite>
27+
<!--
28+
TODO: AboutDataTypes...
29+
-->
30+
<Suite class="AboutObjects">
31+
<Koan name="objectEqualsNull"
32+
lesson="An Object instance should NEVER equal null keyword. This applies to all subclasses (everything exception primitives subclass Object)."/>
33+
<Koan name="objectEqualsSelf"
34+
lesson="An Object instance should equal itself. This too applies to all subclasses of Object."/>
35+
<Koan name="objectIdentityEqualityIsTrueWhenReferringToSameObject"
36+
lesson="An object should equal itself, even if referenced from another variable name."/>
37+
<Koan name="subclassesEqualsMethodIsLooserThanDoubleEquals"
38+
lesson="Integer, and many other classes implement equals logically, in other words, they compare properties of each other and not just identity."/>
39+
<Koan name="doubleEqualsOperatorEvalutesToTrueOnlyWithSameInstance"
40+
lesson="Double equals operator (==) does not invoke equal, it will evaluate to true if both references refer to the same object or primitive."/>
41+
<Koan name="doubleEqualsOperatorEvalutesToFalseWithDifferentInstances"
42+
lesson="The inverse of the prior koan, though two objects may be logically equal, they are not referencing the same object."/>
43+
<Koan name="objectToString"
44+
lesson="How to identify an object at in string form. Should be overridden in any objects with internal state. Default to string is classname of the instance followed by its hashCode in base 16 (hexadecimal)."/>
45+
<Koan name="toStringConcatenates"
46+
lesson="Java 's string concatenation syntax utilizes addition operator to splice a string with virtually anything."/>
47+
<Koan name="toStringIsTestedForNullWhenInvokedImplicitly"
48+
lesson="String concatenation implicitly invokes toString on Objects, unless they are null. Notice no NullPointerException is thrown."/>
49+
</Suite>
50+
</Package>
51+
<!--
52+
<Suite class="AboutArrays" order="arraysDoNotConsiderElementsWhenEvaluatingEquality, cloneEqualityIs_NotRespected,
53+
anArraysHashCodeMethodDoesNotConsiderElements, arraysHelperClassEqualsMethodConsidersElementsWhenDeterminingEquality,
54+
arraysHelperClassHashCodeMethodConsidersElementsWhenDeterminingHashCode, arraysAreMutable, arraysAreIndexedAtZero,
55+
arrayIndexOutOfBounds, arrayLengthCanBeChecked"/>
56+
</Package>
57+
<Package pkg="intermediate" name="Intermediate">
58+
<Suite class="AboutAutoboxing" order="addPrimativesToCollection, addPrimativesToCollectionWithAutoBoxing,
59+
migrateYourExistingCodeToAutoBoxingWithoutFear, allPrimativesCanBeAutoboxed"/>
60+
</Package>
61+
-->
62+
<Package pkg="advanced" name="Advanced">
63+
<Suite class="AboutMocks">
64+
<Koan name="simpleAnonymousMock"
65+
lesson="How can this pass without touching the ClassUnderTest?"/>
66+
</Suite>
67+
</Package>
68+
</Packages>
2.3 KB
Binary file not shown.
379 Bytes
Binary file not shown.
2.24 KB
Binary file not shown.
1.67 KB
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)