aboutsummaryrefslogtreecommitdiffstats
path: root/app/src/androidTest/java/com/zeapo/pwdstore/RepositoryCreation.java
blob: 63c77e3ab154455ad6f806d6209dec530215293e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package com.zeapo.pwdstore;

import android.app.Activity;
import android.app.Instrumentation;
import android.content.Intent;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.test.ActivityInstrumentationTestCase2;

public class RepositoryCreation extends ActivityInstrumentationTestCase2<PasswordStore> {

    public RepositoryCreation() {
        super(PasswordStore.class);
    }

    protected void setUp() throws Exception {
        super.setUp();
        Instrumentation mInstrumentation = getInstrumentation();
        Intent intent = new Intent();
        setActivityIntent(intent);

        Activity passwordStore = getActivity();
        assertNotNull(passwordStore);
        SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(passwordStore.getApplicationContext());
        settings.edit().clear().apply();
    }

    /**
     * If we change from ssh protocol to https we automatically switch to username/password auth
     */
    public void testSpinnerChange() throws Exception{
    }
}