Moved tests into updater package, updated multiRepo.*.jar repos.
The tests are in the .updater packate to make them easier to run as a suite in Android Studio. Now the package can be right clicked and ran to run all the tests to do with updating. The index jar files were updated so as to include info in most metadata fields (e.g. URLs/descriptions/summary/etc) to show that that particular part of metadata came from a specific repo. This will allow more specific tests to show that we can indeed query for an app with metadata provided by the repo with the highest priority.
This commit is contained in:
parent
6d2fdb2843
commit
e25d26aca0
@ -61,7 +61,7 @@ public class RepoXMLHandler extends DefaultHandler {
|
|||||||
|
|
||||||
private final StringBuilder curchars = new StringBuilder();
|
private final StringBuilder curchars = new StringBuilder();
|
||||||
|
|
||||||
interface IndexReceiver {
|
public interface IndexReceiver {
|
||||||
void receiveRepo(String name, String description, String signingCert, int maxage, int version, long timestamp);
|
void receiveRepo(String name, String description, String signingCert, int maxage, int version, long timestamp);
|
||||||
|
|
||||||
void receiveApp(App app, List<Apk> packages);
|
void receiveApp(App app, List<Apk> packages);
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
|
|
||||||
package org.fdroid.fdroid;
|
package org.fdroid.fdroid.updater;
|
||||||
|
|
||||||
import android.content.ContentValues;
|
import android.content.ContentValues;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import org.fdroid.fdroid.BuildConfig;
|
||||||
import org.fdroid.fdroid.RepoUpdater.UpdateException;
|
import org.fdroid.fdroid.RepoUpdater.UpdateException;
|
||||||
import org.fdroid.fdroid.data.Repo;
|
import org.fdroid.fdroid.data.Repo;
|
||||||
import org.fdroid.fdroid.data.RepoProvider;
|
import org.fdroid.fdroid.data.RepoProvider;
|
@ -1,12 +1,15 @@
|
|||||||
|
|
||||||
package org.fdroid.fdroid;
|
package org.fdroid.fdroid.updater;
|
||||||
|
|
||||||
import android.content.ContentValues;
|
import android.content.ContentValues;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
|
import org.fdroid.fdroid.Preferences;
|
||||||
|
import org.fdroid.fdroid.RepoUpdater;
|
||||||
import org.fdroid.fdroid.RepoUpdater.UpdateException;
|
import org.fdroid.fdroid.RepoUpdater.UpdateException;
|
||||||
|
import org.fdroid.fdroid.TestUtils;
|
||||||
import org.fdroid.fdroid.data.Apk;
|
import org.fdroid.fdroid.data.Apk;
|
||||||
import org.fdroid.fdroid.data.ApkProvider;
|
import org.fdroid.fdroid.data.ApkProvider;
|
||||||
import org.fdroid.fdroid.data.AppProvider;
|
import org.fdroid.fdroid.data.AppProvider;
|
@ -1,9 +1,11 @@
|
|||||||
|
|
||||||
package org.fdroid.fdroid;
|
package org.fdroid.fdroid.updater;
|
||||||
|
|
||||||
import android.support.annotation.StringDef;
|
import android.support.annotation.StringDef;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import org.fdroid.fdroid.BuildConfig;
|
||||||
|
import org.fdroid.fdroid.RepoUpdater;
|
||||||
import org.fdroid.fdroid.data.Apk;
|
import org.fdroid.fdroid.data.Apk;
|
||||||
import org.fdroid.fdroid.data.ApkProvider;
|
import org.fdroid.fdroid.data.ApkProvider;
|
||||||
import org.fdroid.fdroid.data.App;
|
import org.fdroid.fdroid.data.App;
|
||||||
@ -23,6 +25,7 @@ import java.util.List;
|
|||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
import static org.junit.Assert.assertNotNull;
|
import static org.junit.Assert.assertNotNull;
|
||||||
|
|
||||||
|
// TODO: Use sdk=24 when Robolectric supports this
|
||||||
@Config(constants = BuildConfig.class, sdk = 23)
|
@Config(constants = BuildConfig.class, sdk = 23)
|
||||||
@RunWith(RobolectricGradleTestRunner.class)
|
@RunWith(RobolectricGradleTestRunner.class)
|
||||||
public class ProperMultiRepoUpdaterTest extends MultiRepoUpdaterTest {
|
public class ProperMultiRepoUpdaterTest extends MultiRepoUpdaterTest {
|
@ -20,12 +20,14 @@
|
|||||||
* MA 02110-1301, USA.
|
* MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
package org.fdroid.fdroid;
|
package org.fdroid.fdroid.updater;
|
||||||
|
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import org.fdroid.fdroid.BuildConfig;
|
||||||
|
import org.fdroid.fdroid.RepoXMLHandler;
|
||||||
import org.fdroid.fdroid.data.Apk;
|
import org.fdroid.fdroid.data.Apk;
|
||||||
import org.fdroid.fdroid.data.App;
|
import org.fdroid.fdroid.data.App;
|
||||||
import org.fdroid.fdroid.data.Repo;
|
import org.fdroid.fdroid.data.Repo;
|
Loading…
x
Reference in New Issue
Block a user