File tree Expand file tree Collapse file tree 5 files changed +5
-44
lines changed
aztec/src/test/kotlin/org/wordpress/aztec Expand file tree Collapse file tree 5 files changed +5
-44
lines changed Original file line number Diff line number Diff line change 22
33package org.wordpress.aztec
44
5- import android.test.AndroidTestCase
65import android.text.SpannableString
76import android.text.SpannableStringBuilder
8- import androidx.test.core.app.ApplicationProvider
97import org.junit.Assert
10- import org.junit.Before
118import org.junit.Ignore
129import org.junit.Test
1310import org.junit.runner.RunWith
@@ -18,7 +15,7 @@ import org.robolectric.RuntimeEnvironment
1815 * Tests for [AztecParser].
1916 */
2017@RunWith(ParameterizedRobolectricTestRunner ::class )
21- class AztecParserTest (alignmentRendering : AlignmentRendering ) : AndroidTestCase() {
18+ class AztecParserTest (alignmentRendering : AlignmentRendering ) {
2219 private var mParser = AztecParser (alignmentRendering)
2320 private val HTML_BOLD = " <b>Bold</b><br><br>"
2421 private val HTML_LIST_ORDERED = " <ol><li>Ordered</li></ol>"
@@ -96,14 +93,6 @@ class AztecParserTest(alignmentRendering: AlignmentRendering) : AndroidTestCase(
9693 }
9794 }
9895
99- /* *
100- * Initialize variables.
101- */
102- @Before
103- fun init () {
104- context = ApplicationProvider .getApplicationContext()
105- }
106-
10796 /* *
10897 * Parse all text from HTML to span to HTML. If input and output are equal with
10998 * the same length and corresponding characters, [AztecParser] is correct.
Original file line number Diff line number Diff line change 22
33package org.wordpress.aztec
44
5- import android.test.AndroidTestCase
65import android.text.SpannableString
76import android.text.SpannableStringBuilder
8- import androidx.test.core.app.ApplicationProvider
97import junit.framework.Assert
10- import org.junit.Before
118import org.junit.Test
129import org.junit.runner.RunWith
1310import org.robolectric.RobolectricTestRunner
1411import org.robolectric.RuntimeEnvironment
1512import org.wordpress.aztec.source.Format
1613
1714@RunWith(RobolectricTestRunner ::class )
18- class CalypsoFormattingTest : AndroidTestCase () {
15+ class CalypsoFormattingTest {
1916 private var parser = AztecParser (AlignmentRendering .SPAN_LEVEL )
2017
2118 private val HTML_LINE_BREAKS = " HI<br><br><br><br><br><br>BYE"
@@ -97,14 +94,6 @@ class CalypsoFormattingTest : AndroidTestCase() {
9794 " <div class=\" sec $8 ond\" ></div>\n " +
9895 " </div>"
9996
100- /* *
101- * Initialize variables.
102- */
103- @Before
104- fun init () {
105- context = ApplicationProvider .getApplicationContext()
106- }
107-
10897 /* *
10998 * Test the conversion from HTML to visual mode with nested HTML (Calypso format)
11099 *
Original file line number Diff line number Diff line change 22
33package org.wordpress.aztec
44
5- import android.test.AndroidTestCase
65import android.text.SpannableString
7- import androidx.test.core.app.ApplicationProvider
86import junit.framework.Assert
97import org.junit.Before
108import org.junit.Test
@@ -17,7 +15,7 @@ import org.wordpress.aztec.spans.AztecStyleBoldSpan
1715
1816@RunWith(RobolectricTestRunner ::class )
1917@Config(sdk = [24 , 25 ])
20- class CssStyleAttributeTest : AndroidTestCase () {
18+ class CssStyleAttributeTest {
2119
2220 private val EMPTY_STYLE_HTML = " <b>bold</b>"
2321 private val HTML = " <b style=\" name:value;\" >bold</b>"
@@ -27,7 +25,6 @@ class CssStyleAttributeTest : AndroidTestCase() {
2725
2826 @Before
2927 fun init () {
30- context = ApplicationProvider .getApplicationContext()
3128 parser = AztecParser (AlignmentRendering .SPAN_LEVEL )
3229 }
3330
Original file line number Diff line number Diff line change 22
33package org.wordpress.aztec
44
5- import android.test.AndroidTestCase
65import android.text.SpannableString
76import android.text.style.ForegroundColorSpan
8- import androidx.test.core.app.ApplicationProvider
97import junit.framework.Assert
108import org.junit.Before
119import org.junit.Test
@@ -30,7 +28,7 @@ import org.wordpress.aztec.spans.IAztecAttributedSpan
3028 */
3129@RunWith(RobolectricTestRunner ::class )
3230@Config(sdk = [24 , 25 ])
33- class HtmlAttributeStyleColorTest : AndroidTestCase () {
31+ class HtmlAttributeStyleColorTest {
3432
3533 private val HTML_BOLD_STYLE_COLOR = " <b style=\" color:blue;\" >Blue</b>"
3634 private val HTML_BOLD_STYLE_INVALID = " <b style=\" color:@java;\" >Blue</b>"
@@ -45,7 +43,6 @@ class HtmlAttributeStyleColorTest : AndroidTestCase() {
4543
4644 @Before
4745 fun init () {
48- context = ApplicationProvider .getApplicationContext()
4946 parser = AztecParser (AlignmentRendering .SPAN_LEVEL )
5047 }
5148
Original file line number Diff line number Diff line change 22
33package org.wordpress.aztec
44
5- import android.test.AndroidTestCase
65import android.text.SpannableString
7- import androidx.test.core.app.ApplicationProvider
86import junit.framework.Assert
9- import org.junit.Before
107import org.junit.Test
118import org.junit.runner.RunWith
129import org.robolectric.RobolectricTestRunner
1310import org.robolectric.RuntimeEnvironment
1411import org.wordpress.aztec.source.Format
1512
1613@RunWith(RobolectricTestRunner ::class )
17- class HtmlFormattingTest : AndroidTestCase () {
14+ class HtmlFormattingTest {
1815
1916 private var parser = AztecParser (AlignmentRendering .SPAN_LEVEL )
2017
@@ -166,14 +163,6 @@ class HtmlFormattingTest : AndroidTestCase() {
166163 private val HTML_NESTED_BOLD_TAGS_HTML_PROCESSING_OUTPUT =
167164 " <b>Test post</b> <b></b><br><br>Our room with a view[/caption] Test end"
168165
169- /* *
170- * Initialize variables.
171- */
172- @Before
173- fun init () {
174- context = ApplicationProvider .getApplicationContext()
175- }
176-
177166 /* *
178167 * Test the conversion from HTML to visual mode with nested HTML
179168 *
You can’t perform that action at this time.
0 commit comments