mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
UI code cleanup.
This commit is contained in:
@@ -48,23 +48,23 @@ import static org.robolectric.Shadows.shadowOf;
|
||||
|
||||
@RunWith(RobolectricGradleTestRunner.class)
|
||||
@Config(constants = BuildConfig.class, sdk = 21,
|
||||
application = TestBriarApplicationImp.class)
|
||||
application = TestBriarApplication.class)
|
||||
public class SetupActivityTest {
|
||||
|
||||
TestSetupActivity setupActivity;
|
||||
TextInputLayout nicknameEntryWrapper;
|
||||
TextInputLayout passwordEntryWrapper;
|
||||
TextInputLayout passwordConfirmationWrapper;
|
||||
EditText nicknameEntry;
|
||||
EditText passwordEntry;
|
||||
EditText passwordConfirmation;
|
||||
StrengthMeter strengthMeter;
|
||||
Button createAccountButton;
|
||||
private TestSetupActivity setupActivity;
|
||||
private TextInputLayout nicknameEntryWrapper;
|
||||
private TextInputLayout passwordEntryWrapper;
|
||||
private TextInputLayout passwordConfirmationWrapper;
|
||||
private EditText nicknameEntry;
|
||||
private EditText passwordEntry;
|
||||
private EditText passwordConfirmation;
|
||||
private StrengthMeter strengthMeter;
|
||||
private Button createAccountButton;
|
||||
|
||||
@Mock
|
||||
SetupController setupController;
|
||||
private SetupController setupController;
|
||||
@Captor
|
||||
ArgumentCaptor<ResultHandler<Long>> resultCaptor;
|
||||
private ArgumentCaptor<ResultHandler<Long>> resultCaptor;
|
||||
|
||||
@Before
|
||||
public void setUp() {
|
||||
@@ -225,5 +225,4 @@ public class SetupActivityTest {
|
||||
Mockito.verify(mockedController, Mockito.times(1))
|
||||
.estimatePasswordStrength(eq("empty"));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -12,13 +12,13 @@ import org.briarproject.android.DaggerAndroidComponent;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
* This Class only exists to get around ACRA
|
||||
* This class only exists to avoid static initialisation of ACRA
|
||||
*/
|
||||
public class TestBriarApplicationImp extends Application implements
|
||||
BriarApplication{
|
||||
public class TestBriarApplication extends Application
|
||||
implements BriarApplication {
|
||||
|
||||
private static final Logger LOG =
|
||||
Logger.getLogger(TestBriarApplicationImp.class.getName());
|
||||
Logger.getLogger(TestBriarApplication.class.getName());
|
||||
|
||||
private AndroidComponent applicationComponent;
|
||||
|
||||
@@ -37,6 +37,7 @@ public class TestBriarApplicationImp extends Application implements
|
||||
AndroidEagerSingletons.initEagerSingletons(applicationComponent);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AndroidComponent getApplicationComponent() {
|
||||
return applicationComponent;
|
||||
}
|
||||
@@ -10,11 +10,10 @@ import org.briarproject.android.controller.SetupController;
|
||||
public class TestSetupActivity extends SetupActivity {
|
||||
|
||||
public SetupController getController() {
|
||||
return this.setupController;
|
||||
return setupController;
|
||||
}
|
||||
|
||||
public void setController(SetupController setupController) {
|
||||
this.setupController = setupController;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user