Saturday 12 January 2013

Creating a method in Pharo Smalltalk

In the Class browser, navigate to the protocol group of the class of the package that you want.

By convention, for Test Driven Development, you first create a test method for your method .

Also by convention, the test for the Shout method of class String in Package Collections-Text is going to be called testShout in StringTest in CollectionsTest-Text.

The test browser is going to refer to this as StringTest>>#testShout  - i.e. the testShout method of class StringTest.


When you run the test, failed tests appear with a  Red background, passed tests appear with a Green background


No comments: