Skip to content

Commit bbdd329

Browse files
committed
Test: Resolve robolectric package parser exception due to config sdk 23
This '@config(sdk = [23])' is now outdated due to the 'minSdkVersion' update to '24'. As such, this configuration is being removed from everywhere. Also, and whenever necessary the '@config(sdk = [21, 25])' configuration is being updated to '@config(sdk = [24, 25])' for the same reason.
1 parent 8428830 commit bbdd329

27 files changed

+6
-47
lines changed

aztec/src/test/kotlin/org/wordpress/aztec/AttributeTest.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import org.junit.Test
77
import org.junit.runner.RunWith
88
import org.robolectric.Robolectric
99
import org.robolectric.RobolectricTestRunner
10-
import org.robolectric.annotation.Config
1110
import org.wordpress.aztec.TestUtils.safeAppend
1211
import org.wordpress.aztec.TestUtils.safeLength
1312
import org.wordpress.aztec.watchers.EndOfBufferMarkerAdder
@@ -16,7 +15,6 @@ import org.wordpress.aztec.watchers.EndOfBufferMarkerAdder
1615
* Testing attribute preservation for supported HTML elements
1716
*/
1817
@RunWith(RobolectricTestRunner::class)
19-
@Config(sdk = [23])
2018
class AttributeTest {
2119
companion object {
2220
private val HEADING =

aztec/src/test/kotlin/org/wordpress/aztec/AztecParserTest.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,11 @@ import org.junit.Test
1313
import org.junit.runner.RunWith
1414
import org.robolectric.ParameterizedRobolectricTestRunner
1515
import org.robolectric.RuntimeEnvironment
16-
import org.robolectric.annotation.Config
1716

1817
/**
1918
* Tests for [AztecParser].
2019
*/
2120
@RunWith(ParameterizedRobolectricTestRunner::class)
22-
@Config(sdk = [23])
2321
class AztecParserTest(alignmentRendering: AlignmentRendering) : AndroidTestCase() {
2422
private var mParser = AztecParser(alignmentRendering)
2523
private val HTML_BOLD = "<b>Bold</b><br><br>"

aztec/src/test/kotlin/org/wordpress/aztec/AztecToolbarTest.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ import org.junit.Test
88
import org.junit.runner.RunWith
99
import org.robolectric.Robolectric
1010
import org.robolectric.RobolectricTestRunner
11-
import org.robolectric.annotation.Config
1211
import org.wordpress.aztec.source.SourceViewEditText
1312
import org.wordpress.aztec.toolbar.AztecToolbar
1413

1514
/**
1615
* Combined test for toolbar and inline styles.
1716
*/
1817
@RunWith(RobolectricTestRunner::class)
19-
@Config(sdk = [23])
2018
class AztecToolbarTest {
2119
lateinit var editText: AztecText
2220
lateinit var sourceText: SourceViewEditText

aztec/src/test/kotlin/org/wordpress/aztec/BlockElementsTest.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import org.junit.Test
77
import org.junit.runner.RunWith
88
import org.robolectric.ParameterizedRobolectricTestRunner
99
import org.robolectric.Robolectric
10-
import org.robolectric.annotation.Config
1110

1211
import org.wordpress.aztec.TestUtils.backspaceAt
1312
import org.wordpress.aztec.TestUtils.safeAppend
@@ -18,7 +17,6 @@ import org.wordpress.aztec.TestUtils.safeLength
1817
* Testing interactions of multiple block elements
1918
*/
2019
@RunWith(ParameterizedRobolectricTestRunner::class)
21-
@Config(sdk = [23])
2220
class BlockElementsTest(val alignmentRendering: AlignmentRendering) {
2321
lateinit var editText: AztecText
2422

aztec/src/test/kotlin/org/wordpress/aztec/CalypsoFormattingTest.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,9 @@ import org.junit.Test
1212
import org.junit.runner.RunWith
1313
import org.robolectric.RobolectricTestRunner
1414
import org.robolectric.RuntimeEnvironment
15-
import org.robolectric.annotation.Config
1615
import org.wordpress.aztec.source.Format
1716

1817
@RunWith(RobolectricTestRunner::class)
19-
@Config(sdk = [23])
2018
class CalypsoFormattingTest : AndroidTestCase() {
2119
private var parser = AztecParser(AlignmentRendering.SPAN_LEVEL)
2220

aztec/src/test/kotlin/org/wordpress/aztec/ClipboardTest.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@ import org.junit.Test
1010
import org.junit.runner.RunWith
1111
import org.robolectric.Robolectric
1212
import org.robolectric.RobolectricTestRunner
13-
import org.robolectric.annotation.Config
1413
import org.wordpress.aztec.source.Format
1514

1615
@RunWith(RobolectricTestRunner::class)
17-
@Config(sdk = [23])
1816
class ClipboardTest {
1917
private val HEADING =
2018
"<h1>Heading 1</h1>" +

aztec/src/test/kotlin/org/wordpress/aztec/CssStyleAttributeTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import org.wordpress.aztec.source.CssStyleFormatter
1616
import org.wordpress.aztec.spans.AztecStyleBoldSpan
1717

1818
@RunWith(RobolectricTestRunner::class)
19-
@Config(sdk = intArrayOf(21, 25))
19+
@Config(sdk = [24, 25])
2020
class CssStyleAttributeTest : AndroidTestCase() {
2121

2222
private val EMPTY_STYLE_HTML = "<b>bold</b>"

aztec/src/test/kotlin/org/wordpress/aztec/CssUnderlinePluginTest.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import org.junit.Test
77
import org.junit.runner.RunWith
88
import org.robolectric.Robolectric
99
import org.robolectric.RobolectricTestRunner
10-
import org.robolectric.annotation.Config
1110
import org.wordpress.aztec.plugins.CssUnderlinePlugin
1211
import org.wordpress.aztec.source.CssStyleFormatter
1312
import org.wordpress.aztec.spans.AztecUnderlineSpan
@@ -16,7 +15,6 @@ import org.wordpress.aztec.spans.AztecUnderlineSpan
1615
* Combined test for toolbar and inline styles.
1716
*/
1817
@RunWith(RobolectricTestRunner::class)
19-
@Config(sdk = [23])
2018
class CssUnderlinePluginTest {
2119
lateinit var editText: AztecText
2220

aztec/src/test/kotlin/org/wordpress/aztec/HeadingTest.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import org.junit.Test
1010
import org.junit.runner.RunWith
1111
import org.robolectric.Robolectric
1212
import org.robolectric.RobolectricTestRunner
13-
import org.robolectric.annotation.Config
1413
import org.wordpress.aztec.TestUtils.safeAppend
1514
import org.wordpress.aztec.TestUtils.safeLength
1615
import org.wordpress.aztec.source.SourceViewEditText
@@ -20,7 +19,6 @@ import org.wordpress.aztec.toolbar.AztecToolbar
2019
* Testing heading behaviour.
2120
*/
2221
@RunWith(RobolectricTestRunner::class)
23-
@Config(sdk = [23])
2422
class HeadingTest {
2523
lateinit var editText: AztecText
2624
lateinit var sourceText: SourceViewEditText

aztec/src/test/kotlin/org/wordpress/aztec/HtmlAttributeStyleColorTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ import org.wordpress.aztec.spans.IAztecAttributedSpan
2929
* Also tests invalid html style attribute color properties.
3030
*/
3131
@RunWith(RobolectricTestRunner::class)
32-
@Config(sdk = intArrayOf(21, 25))
32+
@Config(sdk = [24, 25])
3333
class HtmlAttributeStyleColorTest : AndroidTestCase() {
3434

3535
private val HTML_BOLD_STYLE_COLOR = "<b style=\"color:blue;\">Blue</b>"

0 commit comments

Comments
 (0)