Browse Source

Fix the footnote references

Bradlee Speice 4 years ago
parent
commit
3e130e2572
1 changed files with 12 additions and 12 deletions
  1. 12
    12
      _posts/2015-02-23-robolectric-plus-android-lollipop.md

+ 12
- 12
_posts/2015-02-23-robolectric-plus-android-lollipop.md View File

@@ -14,25 +14,25 @@ share:
14 14
 Getting actual Android code running on your computer
15 15
 ----------------------------------------------------
16 16
 
17
-So far in the life of [MinimalBible](0) the
17
+So far in the life of [MinimalBible][0] the
18 18
 whole testing situation has been... *eherm*... convoluted. I've previously outlined why
19
-I [replatformed](1) the application, how managing the `Application` lifecycle [makes testing
20
-difficult](2), and finally how I've gotten [non-emulator testing set up](3) to report code coverage.
19
+I [replatformed][1] the application, how managing the `Application` lifecycle [makes testing
20
+difficult][2], and finally how I've gotten [non-emulator testing set up][3] to report code coverage.
21 21
 
22 22
 One of the things I've wanted to do for a while, but proved difficult after many long nights with
23
-StackOverflow and other technology sites was get the [Robolectric](4) project working with my code.
23
+StackOverflow and other technology sites was get the [Robolectric][4] project working with my code.
24 24
 Robolectric is basically a re-implementation of the Android SDK designed for easy testing. So instead
25 25
 of having to run Android tests on an actual device, you can skip that.
26 26
 
27
-Quick caveat: [Don't write UI tests using Robolectric](5). Robolectric is great for running small tests
27
+Quick caveat: [Don't write UI tests using Robolectric][5]. Robolectric is great for running small tests
28 28
 that have to use Android API's, but should not be used to validate that your UI code is working. You won't
29 29
 have an emulator or other device to make sure you actually wrote the tests the right way.
30 30
 
31 31
 And with that out of the way, let me get into what it took for me to get Robolectric up and running for MinimalBible.
32 32
 I imagine there will be other people with similar issues, so it's good to go ahead and talk about. All the code
33
-this post is based off of can be found at commit [71fb362ffe](6).
33
+this post is based off of can be found at commit [71fb362ffe][6].
34 34
 
35
-Assuming you have the project set up as discussed [in my previous post](3) (which was inspired by [this](7)),
35
+Assuming you have the project set up as discussed [in my previous post][3] (which was inspired by [this][7]),
36 36
 the `build.gradle` file change is pretty simple. Just add the following dependency:
37 37
 
38 38
 ```groovy
@@ -54,7 +54,7 @@ android.library.reference.2=../../build/intermediates/exploded-aar/com.android.s
54 54
 
55 55
 The "suppress" line at the top is so that Android Studio doesn't warn you that the properties are unused.
56 56
     
57
-The `Activity` we're actually going to be testing is pretty simple too ([code here](8)):
57
+The `Activity` we're actually going to be testing is pretty simple too ([code here][8]):
58 58
 
59 59
 ```java
60 60
 
@@ -70,7 +70,7 @@ public class BasicSearch extends BaseActivity {
70 70
 }
71 71
 ```
72 72
     
73
-So now that the `Activity` is set up, we need to build a simple test case. Let's do something like this ([code here](9)):
73
+So now that the `Activity` is set up, we need to build a simple test case. Let's do something like this ([code here][9]):
74 74
 
75 75
 ```java
76 76
 
@@ -105,14 +105,14 @@ Robolectric + AppCompat - The deadly duo
105 105
 
106 106
 As of right now, Robolectric has very limited support for Android Lollipop (SDK 21), and most specifically the
107 107
 `appcompat` libraries it ships with. Unfortunately it appears that the `ActionBarDrawerToggle` is causing some
108
-[rather hairy problems](10) that aren't easy to figure out.
108
+[rather hairy problems][10] that aren't easy to figure out.
109 109
 
110 110
 So if you're trying to get Robolectric working on a Lollipop app, here are my tips from the school of hard knocks:
111 111
 
112 112
 1. You can only test Activities that do not use the `ActionBarDrawerToggle`. This thankfully means that `Fragment`
113 113
 testing will work just fine if you set them up maybe outside the original intended `Activity`.
114 114
 
115
-2. Please make sure that all tests receive an `@Config(emulateSdk = 18)` until [this issue](11) is closed.
115
+2. Please make sure that all tests receive an `@Config(emulateSdk = 18)` until [this issue][11] is closed.
116 116
 
117 117
 3. Please make sure that Robolectric picks up the support libraries when testing. If they are noticed correctly,
118 118
 the test will output text which includes the two lines below:
@@ -128,7 +128,7 @@ Summary
128 128
 -------
129 129
 
130 130
 So now that we've gone over how to get Robolectric working, and some of the tricks you need to get it working in
131
-Lollipop, go forward and write tests. Who knows, it might bump up your coverage metrics [11%](12).
131
+Lollipop, go forward and write tests. Who knows, it might bump up your coverage metrics [11%][12].
132 132
 
133 133
 Comment below if you have any questions, I'll do what I can to help!
134 134
 

Loading…
Cancel
Save