Skip to content

Commit f74da39

Browse files
committed
Modified backup
1 parent e33cde5 commit f74da39

1 file changed

Lines changed: 166 additions & 146 deletions

File tree

Lines changed: 166 additions & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -1,155 +1,175 @@
11
<?xml version="1.0" encoding="ISO-8859-1"?>
22
<packages>
33
<package pkg="beginner" name="Novice">
4-
<!--
5-
TODO: AboutKoans...
6-
-->
7-
<suite class="AboutKoans">
8-
<koan name="findAboutKoansFile"
9-
lesson="You need to open the file ${file_path}${file_name}.java. There should be a method starting with @Koan called ${method_name}, look within it for your first lesson. Once conquered, run again for your next lesson."
10-
displayIncompleteKoanException="false" />
11-
<koan name="definitionOfKoanCompletion"
12-
lesson="A koan is considered complete when it no longer throws an exception. Often there is more than one way to solve a koan, but only one correct way. This is often hinted at within the koan itself, or the comments appearing here."
13-
displayIncompleteKoanException="false" />
14-
</suite>
15-
<suite class="AboutAssertions">
16-
<koan name="assertBooleanTrue"
17-
lesson="The __ are an attempt to communicate the need to fill in an answer. Judging by context, what should __ be replaced with?"/>
18-
<koan name="assertBooleanFalse"
19-
lesson="Like the prior koan. Ponder if you will, the power of simple assertions when verifying an object's behavior."/>
20-
<!-- TODO introduce instantiation, constructors -->
21-
<koan name="assertNullObject"
22-
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."/>
23-
<koan name="assertNotNullObject"
24-
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."/>
25-
<!-- TODO explain arguments (mention they've been used in prior koans, or maybe wedge that lesson earlier?) -->
26-
<koan name="assertEqualsWithDescriptiveMessage"
27-
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(...)"/>
28-
<!-- TODO finish explaining -->
29-
<koan name="assertSameInstance"
30-
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."/>
31-
<koan name="assertNotSameInstance"
32-
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."/>
33-
<!-- TODO assertThatUsingMatcher" -->
34-
</suite>
35-
<!--
36-
TODO: AboutDataTypes...
37-
-->
38-
<suite class="AboutObjects">
39-
<koan name="objectEqualsNull"
40-
lesson="An Object instance should NEVER equal null keyword. This applies to all subclasses (everything exception primitives subclass Object)."/>
41-
<koan name="objectEqualsSelf"
42-
lesson="An Object instance should equal itself. This too applies to all subclasses of Object."/>
43-
<koan name="objectIdentityEqualityIsTrueWhenReferringToSameObject"
44-
lesson="An object should equal itself, even if referenced from another variable name."/>
45-
<koan name="subclassesEqualsMethodIsLooserThanDoubleEquals"
46-
lesson="Integer, and many other classes implement equals logically, in other words, they compare properties of each other and not just identity."/>
47-
<koan name="doubleEqualsOperatorEvalutesToTrueOnlyWithSameInstance"
48-
lesson="Double equals operator (==) does not invoke equal, it will evaluate to true if both references refer to the same object or primitive."/>
49-
<koan name="doubleEqualsOperatorEvalutesToFalseWithDifferentInstances"
50-
lesson="The inverse of the prior koan, though two objects may be logically equal, they are not referencing the same object."/>
51-
<koan name="objectToString"
52-
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)."/>
53-
<koan name="toStringConcatenates"
54-
lesson="Java 's string concatenation syntax utilizes addition operator to splice a string with virtually anything."/>
55-
<koan name="toStringIsTestedForNullWhenInvokedImplicitly"
56-
lesson="String concatenation implicitly invokes toString on Objects, unless they are null. Notice no NullPointerException is thrown."/>
57-
</suite>
58-
<suite class="AboutCasting">
59-
<koan name="longPlusInt" />
60-
<koan name="forceIntTypecast" />
61-
<koan name="implicitTypecast" />
62-
<koan name="downCastWithInerhitance" />
63-
<koan name="downCastAndPolymophism" />
64-
<koan name="upCastWithInheritance" />
65-
<koan name="upCastAndPolymophism" />
66-
<koan name="complicatedCast" />
67-
<koan name="complicatedCastWithInterface" />
68-
</suite>
69-
<suite class="AboutConditionals">
70-
<koan name="basicIfWithoutCurly" />
71-
<koan name="basicIfElseWithoutCurly" />
72-
<koan name="basicIfElseIfElseWithoutCurly" />
73-
<koan name="nestedIfsWithoutCurlysAreReallyMisleading" />
74-
<koan name="ifAsIntended" />
75-
</suite>
76-
<suite class="AboutInheritance">
77-
<koan name="differenceBetweenOverloadingAndOverriding" />
78-
<koan name="overridenMethodsMayReturnSubtype"
79-
lesson="An overridden method may return a subtype of the return type for the method being overridden. Look at the javadoc for java.util.Collection or java.util.List - it will reveal how to eliminate this type cast."/>
80-
</suite>
81-
<suite class="AboutConstructors">
82-
<koan name="simpleConstructorOrder" />
83-
<koan name="complexConstructorOrder" />
84-
</suite>
85-
<suite class="AboutEnums">
86-
<koan name="basicEnums" />
87-
<koan name="basicEnumsAccess" />
88-
<koan name="enumsWithAttributes" />
89-
<koan name="enumsWithMethods" />
90-
</suite>
91-
<suite class="AboutMethodPreference">
92-
<koan name="methodPreferenceInt" />
93-
<koan name="methodPreferenceInteger" />
94-
<koan name="methodPreferenceLong" />
95-
<koan name="methodPreferenceBoxedLong" />
96-
<koan name="methodPreferenceDouble" />
97-
<koan name="methodPreferenceMore" />
98-
</suite>
99-
<suite class="AboutOperators">
100-
<koan name="plusPlusVariablePlusPlus" />
101-
<koan name="shortCircuit" />
102-
<koan name="fullAnd" />
103-
<koan name="shortCircuitAnd" />
104-
<koan name="aboutXOR" />
105-
<koan name="dontMistakeEqualsForEqualsEquals" />
106-
</suite>
107-
<suite class="AboutArrays">
108-
<koan name="arraysDoNotConsiderElementsWhenEvaluatingEquality"
109-
lesson="Arrays utilize reference equality, they do not consider elements when determining equality."/>
110-
<koan name="cloneEqualityIs_NotRespected"
111-
lesson="The general contract of clone is that: Object a == new Object(); a != a.clone(); a.equals(a.clone()). Array instances DO NOT honor this contract, despite implementing Cloneable."/>
112-
<koan name="anArraysHashCodeMethodDoesNotConsiderElements"
113-
lesson="Likewise with hashcode, an array instance's hashCode is that of the array, it does not incorporate elements."/>
114-
<koan name="arraysHelperClassEqualsMethodConsidersElementsWhenDeterminingEquality"
115-
lesson="The Arrays.equals(...) method DOES evaluate elements when determining equality. This is called 'Logical Equality'."/>
116-
<koan name="arraysHelperClassHashCodeMethodConsidersElementsWhenDeterminingHashCode"
117-
lesson="Likewise with hashCode, the Arrays.hashCode(...) method DOES consider elements when determining hashCode."/>
118-
<koan name="arraysAreMutable"
119-
lesson="Arrays are always mutable, even when declared final. The final declaration prevents reassignment, but does nothing for elements."/>
120-
<koan name="arraysAreIndexedAtZero"
121-
lesson="Arrays contain elements which are indexed by a number starting with zero."/>
122-
<koan name="arrayIndexOutOfBounds"
123-
lesson="Array instances blow up when referencing an index that doesn't exist."/>
124-
<koan name="arrayLengthCanBeChecked"
125-
lesson="It is often necessary to check the length of an array to ensure an index is valid. This is easy with the array's length property."/>
126-
</suite>
127-
<suite class="AboutPrimitives">
128-
<koan name="byteSize" />
129-
<koan name="shortSize" />
130-
<koan name="integerSize" />
131-
<koan name="longSize" />
132-
<koan name="charSizeAndValue" />
133-
<koan name="floatSize" />
134-
<koan name="doubleSize" />
135-
</suite>
4+
<suite class="AboutKoans">
5+
<koan name="findAboutKoansFile"
6+
lesson="You need to open the file ${file_path}${file_name}.java. There should be a method starting with @Koan called ${method_name}, look within it for your first lesson. Once conquered, run again for your next lesson."
7+
displayIncompleteKoanException="false" />
8+
<koan name="definitionOfKoanCompletion"
9+
lesson="A koan is considered complete when it no longer throws an exception. Often there is more than one way to solve a koan, but only one correct way. This is often hinted at within the koan itself, or the comments appearing here."
10+
displayIncompleteKoanException="false" />
11+
</suite>
12+
<suite class="AboutAssertions">
13+
<koan name="assertBooleanTrue"
14+
lesson="The __ are an attempt to communicate the need to fill in an answer. Judging by context, what should __ be replaced with?" />
15+
<koan name="assertBooleanFalse"
16+
lesson="Like the prior koan. Ponder if you will, the power of simple assertions when verifying an object's behavior." />
17+
<!-- TODO introduce instantiation, constructors -->
18+
<koan name="assertNullObject"
19+
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." />
20+
<koan name="assertNotNullObject"
21+
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." />
22+
<!-- TODO explain arguments (mention they've been used in prior koans,
23+
or maybe wedge that lesson earlier?) -->
24+
<koan name="assertEqualsWithDescriptiveMessage"
25+
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(...)" />
26+
<!-- TODO finish explaining -->
27+
<koan name="assertSameInstance"
28+
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." />
29+
<koan name="assertNotSameInstance"
30+
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." />
31+
<!-- TODO assertThatUsingMatcher" -->
32+
</suite>
33+
<!-- TODO: AboutDataTypes... -->
34+
<suite class="AboutObjects">
35+
<koan name="objectEqualsNull"
36+
lesson="An Object instance should NEVER equal null keyword. This applies to all subclasses (everything exception primitives subclass Object)." />
37+
<koan name="objectEqualsSelf"
38+
lesson="An Object instance should equal itself. This too applies to all subclasses of Object." />
39+
<koan name="objectIdentityEqualityIsTrueWhenReferringToSameObject"
40+
lesson="An object should equal itself, even if referenced from another variable name." />
41+
<koan name="subclassesEqualsMethodIsLooserThanDoubleEquals"
42+
lesson="Integer, and many other classes implement equals logically, in other words, they compare properties of each other and not just identity." />
43+
<koan name="doubleEqualsOperatorEvalutesToTrueOnlyWithSameInstance"
44+
lesson="Double equals operator (==) does not invoke equal, it will evaluate to true if both references refer to the same object or primitive." />
45+
<koan name="doubleEqualsOperatorEvalutesToFalseWithDifferentInstances"
46+
lesson="The inverse of the prior koan, though two objects may be logically equal, they are not referencing the same object." />
47+
<koan name="objectToString"
48+
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)." />
49+
<koan name="toStringConcatenates"
50+
lesson="Java 's string concatenation syntax utilizes addition operator to splice a string with virtually anything." />
51+
<koan name="toStringIsTestedForNullWhenInvokedImplicitly"
52+
lesson="String concatenation implicitly invokes toString on Objects, unless they are null. Notice no NullPointerException is thrown." />
53+
</suite>
54+
<suite class="AboutLoops">
55+
<koan name="basicForLoop" />
56+
<koan name="basicForLoopWithTwoVariables" />
57+
<koan name="extendedForLoop" />
58+
<koan name="whileLoop" />
59+
<koan name="doLoop" />
60+
<koan name="extendedForLoopBreak" />
61+
<koan name="extendedForLoopContinue" />
62+
<koan name="forLoopContinueLabel" />
63+
<koan name="forLoopBreakLabel" />
64+
</suite>
65+
<suite class="AboutCasting">
66+
<koan name="longPlusInt" />
67+
<koan name="forceIntTypecast" />
68+
<koan name="implicitTypecast" />
69+
<koan name="downCastWithInerhitance" />
70+
<koan name="downCastAndPolymophism" />
71+
<koan name="upCastWithInheritance" />
72+
<koan name="upCastAndPolymophism" />
73+
<koan name="complicatedCast" />
74+
<koan name="complicatedCastWithInterface" />
75+
</suite>
76+
<suite class="AboutConditionals">
77+
<koan name="basicIfWithoutCurly" />
78+
<koan name="basicIfElseWithoutCurly" />
79+
<koan name="basicIfElseIfElseWithoutCurly" />
80+
<koan name="nestedIfsWithoutCurlysAreReallyMisleading" />
81+
<koan name="ifAsIntended" />
82+
<koan name="basicSwitchStatement" />
83+
<koan name="switchStatementFallThrough" />
84+
<koan name="switchStatementCrazyFallThrough" />
85+
<koan name="switchStatementConstants" />
86+
<koan name="switchStatementSwitchValues" />
87+
</suite>
88+
<suite class="AboutInheritance">
89+
<koan name="differenceBetweenOverloadingAndOverriding" />
90+
<koan name="overridenMethodsMayReturnSubtype"
91+
lesson="An overridden method may return a subtype of the return type for the method being overridden. Look at the javadoc for java.util.Collection or java.util.List - it will reveal how to eliminate this type cast." />
92+
</suite>
93+
<suite class="AboutConstructors">
94+
<koan name="simpleConstructorOrder" />
95+
<koan name="complexConstructorOrder" />
96+
</suite>
97+
<suite class="AboutEnums">
98+
<koan name="basicEnums" />
99+
<koan name="basicEnumsAccess" />
100+
<koan name="enumsWithAttributes" />
101+
<koan name="enumsWithMethods" />
102+
</suite>
103+
<suite class="AboutMethodPreference">
104+
<koan name="methodPreferenceInt" />
105+
<koan name="methodPreferenceInteger" />
106+
<koan name="methodPreferenceLong" />
107+
<koan name="methodPreferenceBoxedLong" />
108+
<koan name="methodPreferenceDouble" />
109+
<koan name="methodPreferenceMore" />
110+
</suite>
111+
<suite class="AboutOperators">
112+
<koan name="plusPlusVariablePlusPlus" />
113+
<koan name="shortCircuit" />
114+
<koan name="fullAnd" />
115+
<koan name="shortCircuitAnd" />
116+
<koan name="aboutXOR" />
117+
<koan name="dontMistakeEqualsForEqualsEquals" />
118+
</suite>
119+
<suite class="AboutArrays">
120+
<koan name="arraysDoNotConsiderElementsWhenEvaluatingEquality"
121+
lesson="Arrays utilize reference equality, they do not consider elements when determining equality." />
122+
<koan name="cloneEqualityIs_NotRespected"
123+
lesson="The general contract of clone is that: Object a == new Object(); a != a.clone(); a.equals(a.clone()). Array instances DO NOT honor this contract, despite implementing Cloneable." />
124+
<koan name="anArraysHashCodeMethodDoesNotConsiderElements"
125+
lesson="Likewise with hashcode, an array instance's hashCode is that of the array, it does not incorporate elements." />
126+
<koan
127+
name="arraysHelperClassEqualsMethodConsidersElementsWhenDeterminingEquality"
128+
lesson="The Arrays.equals(...) method DOES evaluate elements when determining equality. This is called 'Logical Equality'." />
129+
<koan
130+
name="arraysHelperClassHashCodeMethodConsidersElementsWhenDeterminingHashCode"
131+
lesson="Likewise with hashCode, the Arrays.hashCode(...) method DOES consider elements when determining hashCode." />
132+
<koan name="arraysAreMutable"
133+
lesson="Arrays are always mutable, even when declared final. The final declaration prevents reassignment, but does nothing for elements." />
134+
<koan name="arraysAreIndexedAtZero"
135+
lesson="Arrays contain elements which are indexed by a number starting with zero." />
136+
<koan name="arrayIndexOutOfBounds"
137+
lesson="Array instances blow up when referencing an index that doesn't exist." />
138+
<koan name="arrayLengthCanBeChecked"
139+
lesson="It is often necessary to check the length of an array to ensure an index is valid. This is easy with the array's length property." />
140+
</suite>
141+
<suite class="AboutPrimitives">
142+
<koan name="byteSize" />
143+
<koan name="shortSize" />
144+
<koan name="integerSize" />
145+
<koan name="longSize" />
146+
<koan name="charSizeAndValue" />
147+
<koan name="floatSize" />
148+
<koan name="doubleSize" />
149+
</suite>
136150
</package>
137151
<package pkg="intermediate" name="Intermediate">
138-
<suite class="AboutAutoboxing">
139-
<koan name="addPrimativesToCollection"
140-
lesson="Before Java 5, we had to convert primatives to add to collections"/>
141-
<koan name="addPrimativesToCollectionWithAutoBoxing"
142-
lesson="With AutoBoxing, we can _cheat_"/>
143-
<koan name="migrateYourExistingCodeToAutoBoxingWithoutFear"
144-
lesson="With AutoBoxing, we can intermix as well"/>
145-
<koan name="allPrimativesCanBeAutoboxed"
146-
lesson="All primatives can be autoboxed"/>
147-
</suite>
152+
<suite class="AboutAutoboxing">
153+
<koan name="addPrimativesToCollection"
154+
lesson="Before Java 5, we had to convert primatives to add to collections" />
155+
<koan name="addPrimativesToCollectionWithAutoBoxing" lesson="With AutoBoxing, we can _cheat_" />
156+
<koan name="migrateYourExistingCodeToAutoBoxingWithoutFear"
157+
lesson="With AutoBoxing, we can intermix as well" />
158+
<koan name="allPrimativesCanBeAutoboxed" lesson="All primatives can be autoboxed" />
159+
</suite>
160+
<suite class="AboutSerialization">
161+
<koan name="simpleSerialization" />
162+
<koan name="customObjectSerialization" />
163+
<koan name="customObjectSerializationWithTransientFields" />
164+
<koan name="customSerializationWithUnserializableFields" />
165+
<koan name="serializeWithInteritance" />
166+
<koan name="serializeWithInheritanceWhenParentNotserializable" />
167+
</suite>
148168
</package>
149169
<package pkg="advanced" name="Advanced">
150-
<suite class="AboutMocks">
151-
<koan name="simpleAnonymousMock"
152-
lesson="How can this pass without touching the ClassUnderTest?"/>
153-
</suite>
170+
<suite class="AboutMocks">
171+
<koan name="simpleAnonymousMock"
172+
lesson="How can this pass without touching the ClassUnderTest?" />
173+
</suite>
154174
</package>
155175
</packages>

0 commit comments

Comments
 (0)