Code example for Spannable

Methods: getSpans, length, toString

0
		assertEquals(7, spannable.getSpanEnd(spans[0]));
	} 
	 
	public void testLinkString() { 
		Spannable spannable = (Spannable) bypass.markdownToSpannable("[Link](https://github.com/Uncodin/bypass)");
		URLSpan[] spans = spannable.getSpans(0, spannable.length(), URLSpan.class);
		assertEquals(1, spans.length);
		assertTrue(spannable.toString().contains("Link"));
		assertEquals("https://github.com/Uncodin/bypass", spans[0].getURL());
	} 
	 
	public void testHeaderOrder() { 
		SpannedString spannable = (SpannedString) bypass.markdownToSpannable("Header!!\n--------\nText goes here or something\n*One* **Two** ***Three***\n");
		RelativeSizeSpan[] sizeSpan = spannable.getSpans(0, spannable.length(), RelativeSizeSpan.class);
		assertEquals(1, sizeSpan.length);
		assertEquals(0, spannable.getSpanStart(sizeSpan[0]));
	} 
 
	public void testCodeSpan() { 
		Spannable spannable = (Spannable) bypass.markdownToSpannable("`code`");
		TypefaceSpan[] spans = spannable.getSpans(0, spannable.length(), TypefaceSpan.class);