😶🌫️
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package io.github.wingyplus; | |
| import org.junit.Test; | |
| import static org.junit.Assert.assertEquals; | |
| /** | |
| * Created by wingyplus on 10/6/2016 AD. | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package io.github.wingyplus.calculator; | |
| import android.support.test.espresso.ViewInteraction; | |
| import android.support.test.rule.ActivityTestRule; | |
| import android.support.test.runner.AndroidJUnit4; | |
| import android.test.suitebuilder.annotation.LargeTest; | |
| import android.view.View; | |
| import android.view.ViewGroup; | |
| import android.view.ViewParent; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Test | |
| public void getSingleUserWithAsynchronousMethod() throws InterruptedException { | |
| User wingyplus = new User(); | |
| CountDownLatch signal = new CountDownLatch(1); | |
| userService | |
| .getSingleUser("wingyplus") | |
| .enqueue(new Callback<User>() { | |
| @Override | |
| public void onResponse(Call<User> call, Response<User> response) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Test | |
| public void getSingleUserWithSynchronousMethod() throws IOException { | |
| User wingyplus = userService | |
| .getSingleUser("wingyplus") | |
| .execute() | |
| .body(); | |
| assertThat(wingyplus.getLogin(), is("wingyplus")); | |
| assertThat(wingyplus.getId(), is(484530)); | |
| assertThat(wingyplus.getPublicRepos(), is(197)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package io.github.wingyplus.retrofittut; | |
| import retrofit2.Call; | |
| import retrofit2.http.GET; | |
| import retrofit2.http.Headers; | |
| import retrofit2.http.Path; | |
| public interface UserService { | |
| @Headers({ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package io.github.wingyplus.retrofittut; | |
| import org.junit.Before; | |
| import retrofit2.Retrofit; | |
| import retrofit2.converter.gson.GsonConverterFactory; | |
| public class RetrofitTest { | |
| UserService userService; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| group 'io.github.wingyplus' | |
| version '1.0-SNAPSHOT' | |
| apply plugin: 'java' | |
| sourceCompatibility = 1.8 | |
| targetCompatibility = 1.8 | |
| repositories { | |
| mavenCentral() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defun upcase-any-pos () | |
| (interactive) | |
| (backward-word) | |
| (upcase-word 1)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "encoding/json" | |
| "fmt" | |
| "net/http" | |
| "os" | |
| "time" | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| atom-text-editor::shadow { | |
| .cursor { | |
| border-left: 0 none; | |
| background-color: white; | |
| } | |
| } |