Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Sawicki2011-08-31 17:01:40 +0000
committerKevin Sawicki2011-08-31 17:01:40 +0000
commit5408536f89fb86839d1372202cb6c1002ba52779 (patch)
tree0022dabe5432a2a0adc1d70f64723d723ddd3a1d /org.eclipse.egit.github.core.tests
parent024e6120a7a393294c3ab7b7e61763f4f51acee2 (diff)
downloadegit-github-5408536f89fb86839d1372202cb6c1002ba52779.tar.gz
egit-github-5408536f89fb86839d1372202cb6c1002ba52779.tar.xz
egit-github-5408536f89fb86839d1372202cb6c1002ba52779.zip
Move base64 encoding logic to utility class.
This keeps the Blob model class from referencing HTTP components classes. Change-Id: Idda41afc5581dfbb053866ce8af6aecc3c0c71f3 Signed-off-by: Kevin Sawicki <kevin@github.com>
Diffstat (limited to 'org.eclipse.egit.github.core.tests')
-rw-r--r--org.eclipse.egit.github.core.tests/META-INF/MANIFEST.MF1
-rw-r--r--org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/DataTest.java3
2 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.egit.github.core.tests/META-INF/MANIFEST.MF b/org.eclipse.egit.github.core.tests/META-INF/MANIFEST.MF
index 98348daf..9f50db41 100644
--- a/org.eclipse.egit.github.core.tests/META-INF/MANIFEST.MF
+++ b/org.eclipse.egit.github.core.tests/META-INF/MANIFEST.MF
@@ -11,6 +11,7 @@ Import-Package: com.google.gson;version="[1.6.0,2.0.0)",
org.eclipse.egit.github.core;version="[1.1.0,1.2.0)",
org.eclipse.egit.github.core.client;version="[1.1.0,1.2.0)",
org.eclipse.egit.github.core.service;version="[1.1.0,1.2.0)",
+ org.eclipse.egit.github.core.util;version="[1.1.0,1.2.0)",
org.mockito;version="[1.8.4,2.0.0)",
org.mockito.runners;version="[1.8.4,2.0.0)",
org.mockito.stubbing;version="[1.8.4,2.0.0)"
diff --git a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/DataTest.java b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/DataTest.java
index 06d1680c..acbd288c 100644
--- a/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/DataTest.java
+++ b/org.eclipse.egit.github.core.tests/src/org/eclipse/egit/github/core/tests/live/DataTest.java
@@ -26,6 +26,7 @@ import org.eclipse.egit.github.core.Tree;
import org.eclipse.egit.github.core.TreeEntry;
import org.eclipse.egit.github.core.client.IGitHubConstants;
import org.eclipse.egit.github.core.service.DataService;
+import org.eclipse.egit.github.core.util.EncodingUtils;
import org.junit.Test;
/**
@@ -53,7 +54,7 @@ public class DataTest extends LiveTest {
Blob fetch = service.getBlob(repo, sha);
assertNotNull(fetch);
assertEquals(blob.getContent(),
- new String(Blob.decodeBase64(fetch.getContent()),
+ new String(EncodingUtils.fromBase64(fetch.getContent()),
IGitHubConstants.CHARSET_UTF8));
assertEquals(Blob.ENCODING_BASE64, fetch.getEncoding());
}

Back to the top