Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
9426994
feat(TestSantander-V0.01): tabLayout, criacao das telas iniciais, imp…
May 20, 2019
656dbfa
feat(TestSantander-V0.02): acessandro JSON com retrofit e gson, criaç…
May 20, 2019
aa02969
feat(TestSantander-V0.03): criacao da tela investimento e ajustes no …
May 20, 2019
bde2baf
feat(TestSantander-V0.03.1): criacao da tela investimento e sem downl…
May 21, 2019
86653a7
feat(TestSantander-V0.03.2): finalizacao da tela investimento e sem d…
May 21, 2019
dbb7036
feat(TestSantander-V0.03.3): andamento do projeto, inicio de eventos …
May 21, 2019
f272660
feat(TestSantander-V0.03.4): andamento do projeto, alguns eventos e v…
May 22, 2019
e21f25f
feat(TestSantander-V0.04): telas dinamicamente montadas e com interac…
May 22, 2019
07b1bbc
feat(TestSantander-V0.04.1): inicio das validacoes dos campos nome, e…
May 22, 2019
3506f57
feat(TestSantander-V0.04.2): validacoes do formulario, faltando: limp…
May 23, 2019
e9d4d21
feat(TestSantander-V0.05): validacoes do formulario, faltando: teste …
May 23, 2019
e17bbba
feat(TestSantander-V1.0): versao MVP - com telas dinamicas, integraca…
May 24, 2019
4e871ad
feat(TestSantander-V1.0): versao MVP - com telas dinamicas, integraca…
May 24, 2019
3d6ae0e
feat(TestSantander-V1.0.1): teste e validacoes
May 27, 2019
f8b3e74
feat(TestSantander-V1.0.1): teste e validacoes
May 27, 2019
588f127
feat(TestSantander-V1.0.1): teste e validacoes
May 27, 2019
808103f
feat(TestSantander-V1.1): refactor arch clean, less phoneFormat fn.
May 29, 2019
7854648
feat(TestSantander-V1.1): refactor arch clean, less phoneFormat fn.
May 29, 2019
3ae3b70
feat(TesteAndroid): refacto para clean arch
Jun 4, 2019
9e780d0
feat(TesteSantander v1.2): clean arch, teste no model
Jun 4, 2019
97f744e
feat(TesteSantander v1.2): clean arch, teste no model
Jun 4, 2019
8f9129b
feat(TesteSantander v1.2): clean arch, teste no model - clear code re…
Jun 4, 2019
00a15b2
feat(TesteSantander v1.2.1): testes unitarios
Jun 4, 2019
67271b6
fix(TesteSantander v1.2.2): ajuste no 'clear' do format phone
Jun 5, 2019
f0bc5ef
fix(TesteSantander v1.2.3): ajuste no teste unitario
Jun 5, 2019
a193ec8
fix(TesteSantander v1.2.4): ajuste no teste unitario
Jun 5, 2019
680d227
fix(TesteSantander v1.2.5): ajuste no formulario
Jun 8, 2019
b01a231
fix(TesteSantander v1.2.5): regex acenturadas
Jun 8, 2019
da77ea9
gitignor
alesefs Sep 10, 2021
fd59779
update
alesefs Sep 10, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

SantanderTeste/.idea/codeStyles/Project.xml
SantanderTeste/.idea/gradle.xml
SantanderTeste/.idea/jarRepositories.xml
SantanderTeste/.idea/misc.xml
SantanderTeste/.idea/vcs.xml
SantanderTeste/.idea/codeStyles/Project.xml
SantanderTeste/.idea/gradle.xml
SantanderTeste/.idea/misc.xml
11 changes: 11 additions & 0 deletions SantanderTeste/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
*.iml
.gradle
/local.properties
/.idea/caches/build_file_checksums.ser
/.idea/libraries
/.idea/modules.xml
/.idea/workspace.xml
.DS_Store
/build
/captures
.externalNativeBuild
29 changes: 29 additions & 0 deletions SantanderTeste/.idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 18 additions & 0 deletions SantanderTeste/.idea/gradle.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions SantanderTeste/.idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions SantanderTeste/.idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions SantanderTeste/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Commit V8 = MVP da aplicação 1.2.1 - testes unitários
NEW: Refactor para Clean Arch + MVP
//@TODO1: criar PDF da tela de investimento;


1. para rodar a aplicação, clone o a aplicaçao na linha de comando?
-> git clone https://github.com/alesefs/TesteAndroid.git

2. abra no android studio como "open an existing Android Studio Project"

3. ajuste o SDK para o caaminho do SDK instalado na sua máquina (deve vir o alerta assim que você abrir a aplicação)

4. espere a atualização do gradle e rode a aplicação no emulador ou no device físico


OBS.: caso tente no device físico, verifique se a opção de desenvolvedor está habilitada, se a depuração por USB
também está habilitada.
1 change: 1 addition & 0 deletions SantanderTeste/app/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
44 changes: 44 additions & 0 deletions SantanderTeste/app/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.alessandrofsouza.santanderapp"
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
testOptions {
unitTests {
includeAndroidResources = true
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
testImplementation 'org.mockito:mockito-core:2.7.22'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
androidTestImplementation 'org.mockito:mockito-android:2.7.22'

implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'

implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.5.0'

implementation 'com.github.vipulasri.layouttoimage:library:1.0.0'
}
21 changes: 21 additions & 0 deletions SantanderTeste/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.example.alessandrofsouza.santanderapp;

import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;

import org.junit.Test;
import org.junit.runner.RunWith;

import static org.junit.Assert.*;

/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();

assertEquals("com.example.alessandrofsouza.santanderapp", appContext.getPackageName());
}
}
38 changes: 38 additions & 0 deletions SantanderTeste/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.alessandrofsouza.santanderapp">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />

<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">

<provider
android:authorities="com.example.alessandrofsouza.santanderapp"
android:name="android.support.v4.content.FileProvider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:resource="@xml/file_provider_paths"
android:name="android.support.FILE_PROVIDER_PATHS"/>
</provider>

<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>

</application>

</manifest>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package com.example.alessandrofsouza.santanderapp;

import android.os.Bundle;
import android.support.design.widget.TabLayout;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v7.app.AppCompatActivity;

import com.example.alessandrofsouza.santanderapp.presentation.adapters.PageAdapter;

public class MainActivity extends AppCompatActivity {

private static final String TAG = "Santander ";

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
getSupportActionBar().hide();

// PageAdapter adapter = new PageAdapter(getSupportFragmentManager());
// adapter.add(new InvestmentPresenter(), getString(R.string.investimento));
// adapter.add(new ContactPresenter(), getString(R.string.contato));

PagerAdapter adapter = new PageAdapter(this, getSupportFragmentManager());

ViewPager viewPager = findViewById(R.id.mainPage);
viewPager.setAdapter(adapter);

TabLayout tabLayout = findViewById(R.id.pageTab);
tabLayout.setupWithViewPager(viewPager);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package com.example.alessandrofsouza.santanderapp.data.service;

import com.example.alessandrofsouza.santanderapp.domain.model.ContactModel;
import com.example.alessandrofsouza.santanderapp.domain.model.InvestmentModel;

import java.util.Set;

import retrofit2.Call;
import retrofit2.Retrofit;
import retrofit2.converter.gson.GsonConverterFactory;
import retrofit2.http.GET;

public class ApiService {

//private String BASE_URL = "https://floating-mountain-50292.herokuapp.com/";

public ServiceApi getApi() {
Retrofit retrofit = new Retrofit
.Builder()
.baseUrl(ServiceApi.BASE_URL)
.addConverterFactory(GsonConverterFactory.create())
.build();
return retrofit.create(ServiceApi.class);
}

public interface ServiceApi {

public static final String BASE_URL = "https://floating-mountain-50292.herokuapp.com";

@GET("/cells.json")
Call<ContactModel> listCells();

@GET("/fund.json")
Call<InvestmentModel> listInvestment();

}
}
Loading