Skip to content

Commit

Permalink
fix: ParseUriHttpBodyTest.testInitializeWithUri and ParseUriHttpBodyT…
Browse files Browse the repository at this point in the history
…est.testWriteTo
  • Loading branch information
abubkr-hago committed Aug 19, 2024
1 parent e0fbb52 commit 4c9de42
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions parse/src/test/java/com/parse/ParseUriHttpBodyTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,39 @@
import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals;

import android.content.Context;
import android.net.Uri;
import androidx.test.platform.app.InstrumentationRegistry;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import org.junit.After;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;

@RunWith(RobolectricTestRunner.class)
public class ParseUriHttpBodyTest {
@Rule public final TemporaryFolder temporaryFolder = new TemporaryFolder();

@Before
public void setup() {
Context context = InstrumentationRegistry.getInstrumentation().getTargetContext();
Parse.initialize(
new Parse.Configuration.Builder(context)
.server("http://localhost:1337/parse")
.applicationId("parse")
.build());
}

@After
public void tearDown() {
Parse.destroy();
}

@Test
public void testInitializeWithUri() throws IOException {
byte[] content = {1, 1, 1, 1, 1};
Expand Down

0 comments on commit 4c9de42

Please sign in to comment.