<commit_before># TDD micro-exercises

## [ENG]

### Instructions

Here follow these 4 distinct projects. They could be code you inherited from a legacy code-base. Suppose you already wrote the acceptance tests for the features that uses the classes in these projects. 
Now you want to write unit tests for these projects:

1. **TirePressureMonitoringSystem exercise**:  write the unit tests for the Alarm class, refactor the code as much as you need to make the class testable
1. **UnicodeFileToHtmTextConverter exercise**: write the unit tests for the UnicodeFileToHtmTextConverter class, refactor the code as much as you need to make the class testable
1. **TelemetrySystem exercise**: write the unit tests for the TelemetryDiagnosticControls class, refactor the code as much as you need to make the class testable
1. **TicketDispenser exercise**: write the unit tests for the TicketDispenser, refactor the code as much as you need to make the class testable

Apply the unit testing style you are more comfortable with. You can choose to use stub or mock or not at all. If you do, you are free to use the mocking tool that you prefer. Do the same for the unit testing framework.

### Send your code

To send the code or for any comments and questions you can contact me from:

-  http://github.com/lucaminudel 
-  http://www.linkedin.com/in/lucaminudel 
-  http://twitter.com/lukadotnet 
-  http://blogs.ugidotnet.org/luKa/contact.aspx 




## [ITA]



### Instruzioni

Qui seguono quattro progetti differenti. Potrebbero essere codice che hai ereditato da una code base legacy. Immagina di aver gia' scritto i test di accettazione per le feature che fanno uso
delle classi di questi progetti. Ora vuoi scrivere gli unit test per questi progetti:

1. **esercizio TirePressureMonitoringSystem**: scrivi gli unit test per la classe Alarm, fai il refactoring del codice che ritieni necessario per rendere la classe testabile
1. **esercizio UnicodeFileToHtmTextConverter**: scrivi gli unit tests per la classe UnicodeFileToHtmTextConverter, fai il refactoring codice che ritieni necessario per rendere la classe testabile
1. **esercizio TelemetrySystem**: scrivi gli unit test per la classe TelemetryDiagnosticControls, fai il refactoring codice che ritieni necessario per rendere la classe testabile
1. **esercizio TicketDispenser**: scrivi gli unit test per la classe TicketDispenser, fai il refactoring codice che ritieni necessario per rendere la classe testabile<commit_msg>Detailed instructions about the TDD code<commit_after># TDD micro-exercises

## [ENG]

### Instructions

Here follow these 4 distinct projects. They could be code you inherited from a legacy code-base. Suppose you already wrote the acceptance tests for these projects. 
Now you want to write unit tests for these projects:

1. **TirePressureMonitoringSystem exercise**:  write the unit tests for the Alarm class, refactor the code as much as you need to make the class testable
1. **UnicodeFileToHtmTextConverter exercise**: write the unit tests for the UnicodeFileToHtmTextConverter class, refactor the code as much as you need to make the class testable
1. **TelemetrySystem exercise**: write the unit tests for the TelemetryDiagnosticControls class, refactor the code as much as you need to make the class testable
1. **TicketDispenser exercise**: write the unit tests for the TicketDispenser, refactor the code as much as you need to make the class testable

Apply the unit testing style you are more comfortable with. You can choose to use stub or mock or not at all. If you do, you are free to use the mocking tool that you prefer. Do the same for the unit testing framework.

### Send your code

To send the code or for any comments and questions you can contact me from:

-  http://github.com/lucaminudel 
-  http://www.linkedin.com/in/lucaminudel 
-  http://twitter.com/lukadotnet 
-  http://blogs.ugidotnet.org/luKa/contact.aspx 




## [ITA]



### Instruzioni

Qui seguono quattro progetti differenti. Potrebbero essere codice che hai ereditato da una code base legacy. Immagina di aver gia' scritto i test di accettazione per questi progetti. 
Ora vuoi scrivere gli unit test per questi progetti:

1. **esercizio TirePressureMonitoringSystem**: scrivi gli unit test per la classe Alarm, fai il refactoring del codice che ritieni necessario per rendere la classe testabile
1. **esercizio UnicodeFileToHtmTextConverter**: scrivi gli unit tests per la classe UnicodeFileToHtmTextConverter, fai il refactoring codice che ritieni necessario per rendere la classe testabile
1. **esercizio TelemetrySystem**: scrivi gli unit test per la classe TelemetryDiagnosticControls, fai il refactoring codice che ritieni necessario per rendere la classe testabile
1. **esercizio TicketDispenser**: scrivi gli unit test per la classe TicketDispenser, fai il refactoring codice che ritieni necessario per rendere la classe testabile
{'fraction_non_alphanumeric': 0.05017336324699164, 'fraction_numerical': 0.003671221700999388, 'mean_word_length': 4.7694117647058825, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5256815', 'n_tokens_mistral': 1387, 'n_tokens_neox': 1393, 'n_words': 687}