This file contains hidden or 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
| package com.hepicar.smsverification; | |
| import android.content.BroadcastReceiver; | |
| import android.content.Context; | |
| import android.content.Intent; | |
| import android.os.Bundle; | |
| import android.telephony.SmsManager; | |
| import android.telephony.SmsMessage; | |
| import android.util.Log; | |
| import android.widget.Toast; |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
| package="com.hepicar.smsverification"> | |
| <uses-permission android:name="android.permission.RECEIVE_SMS"/> | |
| <uses-permission android:name="android.permission.READ_SMS" /> | |
| <uses-permission android:name="android.permission.SEND_SMS"/> | |
| <application | |
| android:allowBackup="true" | |
| android:icon="@mipmap/ic_launcher" |
This file contains hidden or 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
| package com.hepicar.smsverification; | |
| import android.Manifest; | |
| import android.content.pm.PackageManager; | |
| import android.support.v4.app.ActivityCompat; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.os.Bundle; | |
| import android.util.Log; | |
| public class MainActivity extends AppCompatActivity { |
This file contains hidden or 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:app="http://schemas.android.com/apk/res-auto" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| android:background="#11bcff" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| tools:context="id.technomotion.simpleweatherapps.MainActivity"> | |
This file contains hidden or 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
| package com.example.presentasi.loginpage; | |
| import android.content.Intent; | |
| import android.content.SharedPreferences; | |
| import android.support.v7.app.AppCompatActivity; | |
| import android.os.Bundle; | |
| import android.util.Log; | |
| import android.view.View; | |
| import android.widget.Button; | |
| import android.widget.EditText; |
This file contains hidden or 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
| /** | |
| * Created by omayib on 22/05/17. | |
| */ | |
| fun main(args: Array<String>){ | |
| val tShirtUbuntu = TShirt(70000,2) | |
| val tShirtAndroid = TShirt(50000,4) | |
| val tShirtCoder = TShirt(80000,3) | |
| val bill = Bill() | |
| bill.add(tShirtUbuntu) |
This file contains hidden or 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 ViewController: UIViewController { | |
| @IBOutlet weak var emailTextField: UITextField! | |
| @IBOutlet weak var passwordTextField: UITextField! | |
| @IBOutlet weak var fullNameTextField: UITextField! | |
| @IBOutlet weak var phoneNumberTextField: UITextField! | |
| var presenter: RegistrationPresenter? | |
| override func viewDidLoad() { | |
| super.viewDidLoad() |
This file contains hidden or 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
| protocol RegistrationDelegate{ | |
| func showProgress() | |
| func hideProgress() | |
| func registrationDidSucceed() | |
| func registrationDidFailed(message: String) | |
| } | |
| class RegistrationPresenter{ | |
| var delegate: RegistrationDelegate | |
This file contains hidden or 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 TheRegistrationPageTests: XCTestCase { | |
| override func setUp() { | |
| super.setUp() | |
| } | |
| //... | |
| func testRegisterWithEmptyEmail(){ | |
| let expec = expectation(description: "registration with empty email") | |
| let registrationPresenter = RegistrationPresenter(delegate: MockUIViewController1(expectation: expec)) | |
| registrationPresenter.register(email: "", password: "123456789", fullName: "michel jhon", phoneNumber: "087654325673") |
This file contains hidden or 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 TheRegistrationPageTests: XCTestCase { | |
| override func setUp() { | |
| super.setUp() | |
| } | |
| override func tearDown() { | |
| super.tearDown() | |
| } | |
| func testRegisterWithEmptyEmail(){ |