This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SomePresenter(val locationProvider: android.location.LoacationProvider){ | |
... | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
fun `update username, success`(){ | |
val testUsername = "John Doe" | |
presenter.submitForm(testUsername) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Test | |
fun `update username, success`(){ | |
val testUsername = "John Doe" | |
whenever(view.username).thenReturn(testUsername) | |
presenter.submitForm() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SomeFormPresenter{ | |
fun submitForm(username:String){ | |
api.update(username) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class SomeFormPresenter{ | |
fun submitForm(){ | |
api.update(view?.username ?: '') | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<form @submit.prevent="onSubmit" > | |
<input v-model="login" type="text"/> | |
<input v-model="password" type="password"/> | |
<input type="submit" value="Login"/> | |
</form> | |
</template> | |
<script> | |
import {mapGetters} from 'vuex' | |
export default { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import Router from 'vue-router' | |
import Home from '../views/Home' | |
import SignIn from '../views/SignIn' | |
import SignOut from '../views/SignOut' | |
import Profile from '../views/Profile' | |
import store from '../store' | |
Vue.use(Router) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import store from './store' | |
import Firebase from 'firebase' | |
const config = { | |
apiKey: <YOUR_API_KEY> | |
authDomain: <YOUR_DOMAIN>, | |
databaseURL: <DB_URL>, | |
projectId: <PROJECT_ID>, | |
storageBucket: <STORAGE_BUCKET>, | |
messagingSenderId: <MESSAGING_SENDER_ID> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue' | |
import Vuex from 'vuex' | |
Vue.use(Vuex) | |
const state = { | |
user: null | |
} | |
const mutations = { |