Skip to content


Subversion checkout URL

You can clone with
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: timcowlishaw/TDDwithMockObjectsAndDesignPrinciples
base: master
head fork: lucaminudel/TDDwithMockObjectsAndDesignPrinciples
compare: master
Checking mergeability… Don’t worry, you can still create the pull request.
Commits on Oct 18, 2012
@lucaminudel lucaminudel Update 86bb8e4
Commits on Mar 20, 2013
@lucaminudel lucaminudel Fix: minor bug into the test. 6349c2f
@lucaminudel lucaminudel Update: added comments to make exercise scope more clear. 12fa582
@lucaminudel lucaminudel Update: increased the probability of connection failure to simulate a…
… behaviour that cannot be controlled in the test environment.
Commits on Mar 21, 2013
@lucaminudel lucaminudel Update: added comments to make exercise scope more clear. 483f045
@lucaminudel lucaminudel Fix: removed unused variable. 9bfe8cb
@lucaminudel lucaminudel Fix: removed random seed so every run give a different sequence. d6264bb
@lucaminudel lucaminudel Fix: resolved a typo. a39f991
Commits on May 11, 2013
@arthuralmeidap arthuralmeidap implementing Tire Pressure Monitoring System PHP version dd9b189
@arthuralmeidap arthuralmeidap added namespace 58bd506
@arthuralmeidap arthuralmeidap implemented Unicode File to HTML Text Converter exercise 44d9e2e
@arthuralmeidap arthuralmeidap implemented TelemetrySystem php version exercise 07bcb7a
@arthuralmeidap arthuralmeidap changed method name 9eafad7
@arthuralmeidap arthuralmeidap implemented TurnTicketDispenser php version exercise e0e027c
@arthuralmeidap arthuralmeidap fixed empty() function call 8a7899c
@arthuralmeidap arthuralmeidap fixed fopen access type parameter and added fclose() to close the stream 8cfc0f7
@lucaminudel lucaminudel Merge pull request #16 from arthuralmeidap/php-version
Implemented PHP exercises version
@lucaminudel lucaminudel Update 83d3f8d
@lucaminudel lucaminudel Update 3559a93
Commits on Sep 12, 2013
@lucaminudel lucaminudel Update f0bb77f
@lucaminudel lucaminudel C#: updated the version of nunit framework to 2.6.2 so both Resharper…
… and Visual Studio run smoothly the unit tests from the IDE.
@lucaminudel lucaminudel TirePressureMonitoringSystem/C#: deleted unnecessary code and synchro…
…nised the proposed solution with changes in the original exercise.
@lucaminudel lucaminudel TirePressureMonitoringSystem/JavaScript: deleted unnecessary code and…
… synchronised the proposed solution with changes in the original exercise.
@lucaminudel lucaminudel UnicodeFileToHtmTextConverter/C#: minor code improvements and upgrade…
… to C# 3.0.
@lucaminudel lucaminudel TicketDispenser/C#: minor code upgrade to C# 3.0. 0347bd3
@lucaminudel lucaminudel TelemetrySystem/C#: minor code upgrade to C# 3.0. a3a6b34
@lucaminudel lucaminudel TirePressureMonitoringSystem/C#: synchronised the proposed solution w…
…ith previous changes in the original exercise.
@lucaminudel lucaminudel TirePressureMonitoringSystem/JavaScript: synchronised the proposed so…
…lution with previous changes in the original exercise.
@lucaminudel lucaminudel TirePressureMonitoringSystem/C#: Fixed typo.
TirePressureMonitoringSystem/JavaScript: Fixed typo and synchronised the proposed solution with previous changes in the original exercise.
@lucaminudel lucaminudel TirePressureMonitoringSystem/Java: deleted unnecessary code and synch…
…ronised the proposed solution with changes in the original exercise.
@lucaminudel lucaminudel UnicodeFileToHtmTextConverter/Java: added to the repo the external li…
…brary and updated the import.
@lucaminudel lucaminudel TelemetrySystem/Java: synchronised code with the latest changes to th…
…e C# version.
Commits on Sep 13, 2013
@lucaminudel lucaminudel TirePressureMonitoringSystem/Ruby: synchronised the code with the ori…
…ginal C# version, minor syntax style improvements.
@lucaminudel lucaminudel UnicodeFileToHtmTextConverter/Ruby: fixed reference to html encoding …
…utility, minor code style changes
@lucaminudel lucaminudel TicketDispenser/Ruby: fixed TurnNumberSequence singleton implementati…
…on, minor code style changes
@lucaminudel lucaminudel TelemetrySystem/Ruby: fixed random number calculations, minor code st…
…yle changes
Commits on Sep 16, 2013
@lucaminudel lucaminudel TelemetrySystem/Python: removed binary file.
UnicodeFileToHtmTextConverterPython: removed binary file.
@lucaminudel lucaminudel TirePressureMonitoringSystem/Python: deleted unnecessary code, added …
…missing property, added comments, added test placeholder
@lucaminudel lucaminudel TelemetrySystem/Python: added comments and changed probability of suc…
…cessful connection of the client.
@lucaminudel lucaminudel Proposed solution: added document with comments about the proposed so…
Commits on Sep 30, 2013
@lucaminudel lucaminudel TirePressureMonitoringSystem/Java: deleted unnecessary file and relat…
…ed folder.
Commits on Oct 07, 2013
@lucaminudel lucaminudel Python exercises: fixed bug and changed library for unicode conversion 77535c6
@lucaminudel lucaminudel TirePressureMonitoringSystem/C#: removed test files from the exercise…
…s, they were confusing
Commits on Oct 08, 2013
@lucaminudel lucaminudel TirePressureMonitoringSystem/Python: set constant to private, minor a…
…ddition to test code to facilitate the test execution from the command line
@lucaminudel lucaminudel UnicodeFileToHtmTextConverter/Python: reverted back from html module …
…to cgi module
@lucaminudel lucaminudel UnicodeFileToHtmTextConverter/Python: added basic test file to check …
…that there are no syntax errors in the exercise code
@lucaminudel lucaminudel TicketDispenser/Python: added basic test file to check that there are…
… no syntax errors in the exercise code
@lucaminudel lucaminudel TelemetrySystem/Python: updated comments, updated TelemetryClient sen…
…d and receive to reflect the latest simpler version, set to private a constant, added test code just to check that there are no syntax errors in the exercise code
@lucaminudel lucaminudel Update 57049fe
@lucaminudel lucaminudel Update 9a940e0
Commits on Oct 09, 2013
@lucaminudel lucaminudel Update 88d0b60
@lucaminudel lucaminudel Proposed solution: Updated general comments. 2d9fbe7
@lucaminudel lucaminudel Merge branch 'master' of… bb886ef
Commits on Oct 14, 2013
@lucaminudel lucaminudel UnicodeFileToHtmTextConverter/Python: added cgi module for Python 2 a…
…nd commented html module that should be used for Python 3. Instructions in the comments.
@lucaminudel lucaminudel TirePressureMonitoringSystem/Python: replaced double underscore with …
…single underscore to follow Python 3 conventions.
Commits on Oct 17, 2013
@saleem saleem @saleem: initial commit of TirePressurMonitoringSystem +…
… + .gitignore
Commits on Oct 18, 2013
@saleem saleem @saleem: Added first test for Alarm d750c3e
@saleem saleem @saleem: new broken test: adding interface ISensor using TDD. This co…
…mmit at the 'Red' stage of 'RGR'
@saleem saleem @saleem: fixed the test: added interface ISensor using TDD. This comm…
…it at the 'Refactor' stage of 'RGR'
@saleem saleem @saleem: new broken test: adding method popNextPressurePsiValue() to …
…interface ISensor using TDD. This commit at the 'Red' stage of 'RGR'
@saleem saleem @saleem: fixed new test: adding method popNextPressurePsiValue() to i…
…nterface ISensor using TDD. This commit at the 'Green' stage of 'RGR'
@saleem saleem @saleem: refactored new test: adding method popNextPressurePsiValue()…
… to interface ISensor using TDD. This commit at the 'Refactor' stage of 'RGR'
@saleem saleem @saleem: added tests for high and low threshold 00cb2fb
@lucaminudel lucaminudel Merge pull request #17 from saleem/master
@saleem's solution for the Tire Pressure Monitoring System, with commit-by-commit details on how the design evolved
@saleem saleem @saleem: Added two more tests to verify interactions between Alarm an…
…d Sensor; changed sourceCompatibility to Java 1.7
@saleem saleem @saleem: Added new test class AlarmTestUsingCustomMock to demonstrate…
… the how verbose code gets if a custom mock class is used
@saleem saleem @saleem: removed unused code from custom mock class 5b8d666
@lucaminudel lucaminudel Merge pull request #18 from saleem/master
@saleem's additional unit test for the Tire Pressure Monitoring System, using a custom mock class
Commits on Oct 19, 2013
@saleem saleem @saleem: First unit test for UnicodeFileToHtmlTextConverter. Changed …
…package name to 'converter', ending in 'er', not 'or'. No other changes to UnicodeFileToHtmlTextConverter yet
@saleem saleem @saleem: added a second test in UnicodeFileToHtmlTextConverterTest. N…
…o changes to UnicodeFileToHtmlTextConverter
Commits on Oct 20, 2013
@saleem saleem @saleem: Added unit test to verify that the class-under-test, Unicode…
…FileToHtmlTextConverter, does call the static method of StringEscapeUtils. Used PowerMockito to accomplish this. No refactoring of UnicodeFileToHtmlTextConverter performed thus far.
Commits on Oct 21, 2013
@lucaminudel lucaminudel Merge pull request #19 from saleem/master
@saleem: unit tests for the text converter solution
Commits on Nov 08, 2013
@lucaminudel lucaminudel TirePressureMonitoringSystem/Java: changed visibility from default/pa…
…ckage to private as is in the C# version.
@lucaminudel lucaminudel Proposed solution: Updated general comments. f0c54e0
Commits on Nov 10, 2013
@lucaminudel lucaminudel Update 6b58662
Commits on Nov 26, 2013
@lucaminudel lucaminudel UnicodeFileToHtmTextConverter/C#: Fixed typo. a06d70f
Commits on Nov 29, 2013
@lucaminudel lucaminudel Added Coding dojo slides. 000d37b
@lucaminudel lucaminudel Update 8bbac52
Commits on Dec 27, 2013
@lucaminudel lucaminudel Updated instructions for the kata. 84c1662
@lucaminudel lucaminudel Update 64cd280
@lucaminudel lucaminudel Update 0519559
@lucaminudel lucaminudel Update fc6daa2
@lucaminudel lucaminudel Update 3054b8b
@lucaminudel lucaminudel Update 7a8e9a4
@lucaminudel lucaminudel Update ccfa26b
Commits on Jan 09, 2014
@MicheleBertoli MicheleBertoli Added async callback 34d6508
Commits on Jan 14, 2014
@MicheleBertoli MicheleBertoli Added async to ProposedSolution 295a897
Commits on Jan 19, 2014
@lucaminudel lucaminudel Merge pull request #20 from MicheleBertoli/master
javascript exercise unicode file to html converter: added async callback in the exercise code and in the proposed solution by MicheleBertoli
Commits on Apr 11, 2014
@wubin28 wubin28 Initialized the Java code for my exercises. bf1e38b
@wubin28 wubin28 Added the interface IAlarm to make code compiled successfully. 81bac2b
@wubin28 wubin28 Added an assertion for test given_psi_pressure_value_is_less_than_17_…
@wubin28 wubin28 Changed the test to be when_check_alarm_then_get_characterization(). 04771c4
@wubin28 wubin28 Made test when_check_alarm_then_get_characterization() passed. 71a9006
@wubin28 wubin28 Added an assertion to test given_psi_pressure_value_is_less_than_17_w…
@wubin28 wubin28 Mocked Sensor in test given_psi_pressure_value_is_less_than_17_when_c…
@wubin28 wubin28 Made test given_psi_pressure_value_is_less_than_17_when_check_alarm_t…
…hen_alarm_is_on() passed.
@wubin28 wubin28 Added test given_psi_pressure_value_is_greater_than_21_when_check_ala…
…rm_then_alarm_is_on() and it passed directly.
@wubin28 wubin28 Added test given_psi_pressure_value_is_between_17_and_21_when_check_a…
…larm_then_alarm_is_off() and it passed directly.
@wubin28 wubin28 Added an assertion for test when_pop_next_pressure_psi_value_then_get…
@wubin28 wubin28 Made test when_pop_next_pressure_psi_value_then_get_characterization(…
…) passed.
@wubin28 wubin28 Renamed the test of Sensor to be when_pop_next_pressure_psi_value_the…
Commits on Apr 14, 2014
@wubin28 wubin28 Initialized C# code for exerciese. 8f6d459
Commits on Apr 15, 2014
@wubin28 wubin28 Added an assertion for test WHEN_check_pressure_value_in_alarm_THEN_g…
@wubin28 wubin28 Got characterization from the test. But the result was random. Will m…
…ock the random part to make the assertion constant.
@wubin28 wubin28 Wrote expected code for injecting a Sensor object while instantiating…
… an Alarm object.
Commits on Apr 16, 2014
@wubin28 wubin28 Mocked the Sensor in the test. 01aa6f4
@wubin28 wubin28 Set up the mocked Sensor in the test. But got error message 'System.N…
…otSupportedException : Invalid setup on a non-virtual (overridable in VB) member: s => s.PopNextPressurePsiValue()'. Will extract interface for class Sensor.
@wubin28 wubin28 Extracted interface ISensor. 7e336ac
@wubin28 wubin28 Renamed the test to be GIVEN_pressure_psi_value_is_16_WHEN_check_pres…
@wubin28 wubin28 Added test GIVEN_pressure_psi_value_is_17_WHEN_check_pressure_value_i…
…n_alarm_THEN_alarm_is_off() and made it passed.
@wubin28 wubin28 Added test GIVEN_pressure_psi_value_is_21_WHEN_check_pressure_value_i…
…n_alarm_THEN_alarm_is_off() and it was passed.
@wubin28 wubin28 Added test GIVEN_pressure_psi_value_is_22_WHEN_check_pressure_value_i…
…n_alarm_THEN_alarm_is_on() and it was passed.
Commits on Apr 17, 2014
@wubin28 wubin28 Added test should_convert_ampersand() in test class UnicodeFileToHtml…
@wubin28 wubin28 Created class TestingUnicodeFileToHtmlTextConverter which is the subc…
…lass of UnicodeFileToHtmlTextConverter.
@wubin28 wubin28 Extracted method OpenTextReader() in class UnicodeFileToHtmlTextConve…
…rter which is going to be overridden by the subclass TestingUnicodeFileToHtmlTextConvert.
@wubin28 wubin28 Changed the return type of method UnicodeFileToHtmlTextConverter.Open…
…TextReader() to be TextReader.
@wubin28 wubin28 Overrode method OpenTextReader() in class TestingUnicodeFileToHtmlTex…
@wubin28 wubin28 Extracted method OpenStringReader() in class TestingUnicodeFileToHtml…
@wubin28 wubin28 Introduced parameter strToBeConverted in method TestingUnicodeFileToH…
…tmlTextConverter.OpenStringReader() to make the business logic clear.
Commits on Apr 18, 2014
@wubin28 wubin28 Added test GIVEN_dispense_a_ticket_WHEN_check_ticket_turn_number_THEN…
@wubin28 wubin28 Made test GIVEN_dispense_a_ticket_WHEN_check_ticket_turn_number_THEN_…
…get_characterization() passed.
@wubin28 wubin28 Added test GIVEN_dispense_a_ticket_WHEN_dispense_a_new_ticket_THEN_tu…
…rn_number_of_the_new_ticket_is_greater() and made it passed.
@wubin28 wubin28 Added test GIVEN_dispense_a_ticket_WHEN_dispense_a_new_ticket_at_anot…
…her_machine_THEN_turn_number_of_the_new_ticket_is_greater() and made it passed.
@wubin28 wubin28 Added an assertion for test GIVEN_dispense_ticket_number_10_WHEN_disp…
@wubin28 wubin28 Used an instance of TestingTicketDispenser in test GIVEN_dispense_tic…
@wubin28 wubin28 Created class TestingTicketDispenser. 722d44d
@wubin28 wubin28 Tried to mock class TurnNumberSequence. But moq4 cannot mock a static…
… type.
@wubin28 wubin28 Changed class TurnNumberSequence and its method GetNextTurnNumber() t…
…o be non-static for mocking. Mocked class TurnNumberSequence in TestingTicketDispenser.GetTurnTicket().
@wubin28 wubin28 Added an assertion in test WHEN_check_Transmision_THEN_get_characteri…
@wubin28 wubin28 Got characterization from test WHEN_check_Transmision_THEN_get_charac…
@wubin28 wubin28 Renamed the test to be WHEN_check_Transmision_THEN_diagnostic_request…
…_should_be_sent_and_message_should_be_got() and mocked class TelemetryClient in it.
@wubin28 wubin28 Created a constructor of class TelemetryDiagnosticControls to inject …
…an instance of TelemetryClient.
Commits on Apr 19, 2014
@wubin28 wubin28 Renamed test to be GIVEN_online_status_of_TelemetryClient_is_tue_WHEN…
…_check_Transmision_THEN_method_Disconnect_Send_and_Receive_should_be_invoked() and mocked TelemetryClient in it.
@wubin28 wubin28 Somehow t => t.Connect(*111#) never performed. b9a5ce6
@wubin28 wubin28 Added test GIVEN_on_happy_path_WHEN_check_transmission_THEN_get_chara…
…cterization() to mock Random in TestingTelemetryClient.
@wubin28 wubin28 Created class TestingTelemetryClient to use Subclass and Override for…
… mocking random behaviours in class TelemetryClient.
@wubin28 wubin28 Injected 3 random numbers (connectionEventsRandomNumberFrom1To10, mes…
…sageRandomNumberFrom50To110, messageRandomNumberFrom40To126) through the constructor parameters of class TestingTelemetryClient.
@wubin28 wubin28 Implemented the constructor of TestingTelemetryClient for injecting t…
…he three random numbers.
@wubin28 wubin28 Introduced parameter connectionEventsRandomNumberFrom1To10 for method…
… TelemetryClient.Connect().
@wubin28 wubin28 Introduced parameter messageRandomNumberFrom50To110 and messageRandom…
…NumberFrom40To126) for method TelemetryClient.Receive().
@wubin28 wubin28 Overrode method Connect() and Receive() in class TestingTelemetryClient. e6e36fa
@wubin28 wubin28 Added test GIVEN_not_online_to_server_WHEN_check_transmission_THEN_ge…
…t_exception() and made it passed.
@lucaminudel lucaminudel Merge pull request #29 from wubin28/master
Wubin28: My C# solution for the 4 katas finished.
Commits on May 21, 2014
@lucaminudel lucaminudel TirePressure/PHP added missing include 46af52f
@lucaminudel lucaminudel TirePressure / Java : removed unnecessary mock/stab files that caused…
… compilation errors
@lucaminudel lucaminudel TirePressure / Java : aligned pom with the version of the library in …
@lucaminudel lucaminudel TirePressure / Java : aligned pom with the version of the library in …
Commits on Jun 11, 2014
@wubin28 wubin28 Added git ignore rules for IDEA. 707366d
@wubin28 wubin28 Created the test class TicketDispenserTest and added a trivial test. 73e265a
@wubin28 wubin28 Added TODO: Depending on a static method violates the Dependency Inve…
…rsion Principle and Open-Closed Principle.
@wubin28 wubin28 Added 3 acceptance test TODOs. 2542708
@wubin28 wubin28 Finished TODO: a new ticket should have the turn number subsequent to…
… the previous ticket.
@wubin28 wubin28 Finished TODO: a new ticket should have the turn number subsequent to…
… the previous ticket from another dispenser.
@wubin28 wubin28 Working on TODO: after ticket 10 come ticket 11. Wrote intention code…
… for the test of this TODO.
@wubin28 wubin28 Created class TestingTurnNumberSequence and made it to be the subclas…
…s of TurnNumberSequence.
@wubin28 wubin28 Created and implemented method TestingTurnNumberSequence.setCurrentTu…
@wubin28 wubin28 Made the field TurnNumberSequence.turnNumber accessable for its subcl…
@wubin28 wubin28 Created and implemented constructor TicketDispenser(TurnNumberSequence). de0ffff
@wubin28 wubin28 Created and implemented constructor TicketDispenser(). 6c13ede
@wubin28 wubin28 Finished TODO: Depending on a static method violates the Dependency I…
…nversion Principle and Open-Closed Principle.
@wubin28 wubin28 Made method TurnNumberSequence.getNextTurnNumber() return the calcula…
…ted turn number.
@wubin28 wubin28 Finished TODO: after ticket 10 come ticket 11. dd25c48
Commits on Sep 25, 2014
@rationalrevolt rationalrevolt Added my solutions 9b7b63b
Commits on Nov 09, 2014
@lucaminudel lucaminudel Merge pull request #31 from rationalrevolt/master
Added my solutions
Commits on Nov 16, 2014
@lucaminudel lucaminudel TirePressureMonitoringSystem/java In Sensor removed seed for the rand…
…om function.
@lucaminudel lucaminudel TirePressureMonitoring/Cpp Added Cpp porting from Emily racing kata repo 4abda94
@lucaminudel lucaminudel TireTirePressureMonitoring/Scala Added Cpp porting from Emily racing …
…kata repo
@lucaminudel lucaminudel textConverter/Scala Added Scala porting from Emily racing kata repo 827c830
@lucaminudel lucaminudel textConverter/Scala Added Scala porting from Emily racing kata repo 0651499
@lucaminudel lucaminudel Added suggested Quick Start instructions for the dojo. 827d8c2
@lucaminudel lucaminudel Slides: updated with extra info for exercise 3 (TicketDispenser) and …
…new languages are included.
@lucaminudel lucaminudel Updated comments and added instructions and agenda for the coding doj…
…o facilitator.
@lucaminudel lucaminudel Instructions updated. 18de4b7
@lucaminudel lucaminudel Instructions updated. 7b72e41
@lucaminudel lucaminudel Instructions updated. 0b5299a
@lucaminudel lucaminudel Instructions updated. bdff56a
@lucaminudel lucaminudel Instructions updated. 40cfe74
Commits on Nov 22, 2014
@lucaminudel lucaminudel Update 933e777
@lucaminudel lucaminudel Update 6e5db1c
Commits on Jan 05, 2015
@lucaminudel lucaminudel Merge pull request #30 from wubin28/master
Used "Subclass and set superclass' field" to verify the next turn number should be increased by 1
Commits on Sep 12, 2015
@codecop codecop ignore IDEA files in Java exercise folder 4a1bfd4
@codecop codecop remove empty test in one Java exercises as the other exercises do not…
… have empty tests
@codecop codecop make all links into same repo relative 45e7f7f
@codecop codecop format Java exercises (only whitespace change), rename 3 fields to co…
…nform to Java conventions
@codecop codecop remove Eclipse generated and binary/build generated files from Java s…
…olution of viswans, should have been ignored
@codecop codecop remove lib jar from Java exercise as it is provided by Maven in solut…
…ion of benwu
@codecop codecop merge ignores in solution of benwu 703d651
@codecop codecop remove folder Java from solution of Roberto-Simoni for consistency b05ea81
@codecop codecop update version of JUnit and Java in Java exercises, format pom f2639a6
@codecop codecop link to comments for facilitator needs to be a raw=true link b14396e
@codecop codecop delete part of solution of benwu, code has not been changed, this is …
…no solution, just a copy
Commits on Sep 13, 2015
@lucaminudel lucaminudel Merge pull request #32 from codecop/master
Minor cleanups for Java exercise and solutions