Se hace un refactoring de la clase Connection y se crear un primer test para la clase Client.
We refactor the Connection class and create the first test for the Client class.
| #!/bin/bash | |
| # MacBook Lid Angle Sensor Diagnostic Script | |
| # This script helps identify the lid angle sensor on different MacBook models | |
| echo "==============================================" | |
| echo "MacBook Lid Angle Sensor Diagnostic Tool" | |
| echo "==============================================" | |
| echo "" |
| using System; | |
| namespace TwitterFeed | |
| { | |
| class Program | |
| { | |
| static void Main(string[] args) | |
| { | |
| string twitterHandle = ""; | |
| if (args.Length == 1) |
Se hace un refactoring de la clase Connection y se crear un primer test para la clase Client.
We refactor the Connection class and create the first test for the Client class.
Segundo commit de serie de refactorización. En este caso extraemos la clase com.cursodegit.twitterFeed.Client y el método displayTweets
Second commit of the code refactoring. We extract the class com.cursodegit.twitterFeed.Client and the method displayTweets
Mientras realizamos el refactoring del código, nuestros compañeros cambian la aplicación para que muestre los tweets con colores.
While we refactor our application, our colleagues will modify the code and add some color to the list of tweets.
Extraemos la clase com.cursodegit.twitterFeed.Connection
Extract class com.cursodegit.twitterFeed.Connection
| package com.cursodegit.twitterFeed; | |
| import java.io.IOException; | |
| import java.net.URI; | |
| import java.net.http.HttpClient; | |
| import java.net.http.HttpRequest; | |
| import java.net.http.HttpResponse; | |
| import java.util.Base64; | |
| import java.util.Map; | |
| import java.util.List; |
| package com.cursodegit.twitterFeed; | |
| import java.io.IOException; | |
| import java.net.URI; | |
| import java.net.http.HttpClient; | |
| import java.net.http.HttpRequest; | |
| import java.net.http.HttpResponse; | |
| import java.util.Base64; | |
| import java.util.Map; | |
| import java.util.List; |
| package com.cursodegit.twitterFeed; | |
| import java.io.IOException; | |
| import java.net.URI; | |
| import java.net.http.HttpClient; | |
| import java.net.http.HttpRequest; | |
| import java.net.http.HttpResponse; | |
| import java.util.Base64; | |
| import java.util.Map; | |
| import java.util.List; |
| package com.cursodegit.twitterFeed; | |
| import java.io.IOException; | |
| import java.net.URI; | |
| import java.net.http.HttpClient; | |
| import java.net.http.HttpRequest; | |
| import java.net.http.HttpResponse; | |
| import java.util.Base64; | |
| import java.util.Map; | |
| import java.util.List; |