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 com.adiaz.expandablelist; | |
import android.content.Context; | |
import android.view.LayoutInflater; | |
import android.view.View; | |
import android.view.ViewGroup; | |
import android.widget.BaseExpandableListAdapter; | |
import android.widget.TextView; | |
import java.util.List; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<android.support.v7.widget.Toolbar | |
xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:id="@+id/toolbar" | |
android:layout_width="match_parent" | |
android:layout_height="wrap_content" | |
android:background="?attr/colorPrimary" | |
android:minHeight="?attr/actionBarSize" | |
app:contentInsetLeft="0dp" |
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 com.examples | |
import com.beust.klaxon.JsonArray | |
import com.beust.klaxon.JsonObject | |
import com.beust.klaxon.Parser | |
import com.examples.DownloadPodcast.Companion.NEXT_PUB_DATE_PUNTA_NORTE | |
import com.examples.DownloadPodcast.Companion.URL_PUNTA_NORTE | |
import java.io.BufferedInputStream | |
import java.io.File | |
import java.io.FileOutputStream |
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
private fun generateInputStream(): InputStream { | |
val bytesOutputStream = ByteArrayOutputStream() | |
val out = ZipOutputStream(bytesOutputStream, Charset.defaultCharset()) | |
val writeEntry = ZipEntry("test.csv") | |
out.putNextEntry(writeEntry) | |
out.write("content".toByteArray()) | |
out.closeEntry() | |
out.close() | |
return ByteArrayInputStream(bytesOutputStream.toByteArray()) | |
} |
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 testReplaceDocument() { | |
MongoCollection<Document> artists = testDb.getCollection("artists"); | |
Bson queryFilter = new Document("_id", band1Id); | |
Document myBand = artists.find(queryFilter).iterator().tryNext(); | |
Assert.assertEquals( | |
"Make sure that the band created in the database is" | |
+ " the same as the band retrieved from the database", | |
bandOne, | |
myBand); |
OlderNewer