Remove testing cases

This commit is contained in:
dtvv 2018-09-03 09:18:48 -06:00
parent 6ef9a501b7
commit e3eeb76f0e
9 changed files with 3 additions and 457 deletions

View file

@ -17,7 +17,9 @@
android:supportsRtl="true"
android:configChanges="locale"
android:theme="@style/AppTheme">
<activity android:name=".activities.LicenseActivity">
<activity
android:name=".activities.LicenseActivity"
android:theme="@style/AppTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@ -103,21 +105,6 @@
<activity android:name=".activities.CreateContactActivity">
</activity>
<!--Test activities-->
<activity android:name=".tests.activities.dialogs.Test_DialogMaterialActivity">
</activity>
<activity android:name=".tests.activities.dialogs.Test_LoadingActivity">
</activity>
<activity android:name=".tests.activities.dialogs.Test_CrystalDialogActivity">
</activity>
<activity android:name=".tests.activities.dialogs.Test_GIFActivity">
</activity>
<activity android:name=".tests.activities.dialogs.Test_ToastActivity">
</activity>
<activity android:name=".tests.activities.dialogs.Test_VideoActivity">
</activity>
</application>
</manifest>

View file

@ -1,97 +0,0 @@
package cy.agorise.crystalwallet.tests.activities.dialogs
import android.os.Bundle
import android.view.View
import cy.agorise.crystalwallet.R
import cy.agorise.crystalwallet.activities.CustomActivity
import cy.agorise.crystalwallet.dialogs.material.ToastIt
import cy.agorise.crystalwallet.models.CryptoNetAccount
import cy.agorise.crystalwallet.views.natives.spinners.CryptoNetAccountsSpinner
import java.util.ArrayList
/*
* Test class
* */
class Test_CryptoNetAccountSpinner : CustomActivity(){
private var cryptoNetAccountsSpinner: CryptoNetAccountsSpinner? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.empty_activity)
/*
* Get the field
* */
cryptoNetAccountsSpinner = findViewById(R.id.cryptoNetAccountsSpinner)
/*Make it visible*/
cryptoNetAccountsSpinner?.visibility= View.VISIBLE
/*
* Add models for testing
* */
var cryptoNetAccounts: MutableList<CryptoNetAccount> = ArrayList()
var cryptoNetAccount:CryptoNetAccount = CryptoNetAccount();
cryptoNetAccount.setAccountIndex(1);
cryptoNetAccount.setName("David Tadeo Vargas");
cryptoNetAccount.setId(0);
cryptoNetAccount.setSeedId(10203024L);
cryptoNetAccounts.add(cryptoNetAccount);
cryptoNetAccount = CryptoNetAccount();
cryptoNetAccount.setAccountIndex(2);
cryptoNetAccount.setName("Alfredo mercado mendoza");
cryptoNetAccount.setId(1);
cryptoNetAccount.setSeedId(10203024L);
cryptoNetAccounts.add(cryptoNetAccount);
cryptoNetAccount = CryptoNetAccount();
cryptoNetAccount.setAccountIndex(3);
cryptoNetAccount.setName("Alejandra Mendoza Sanchez");
cryptoNetAccount.setId(2);
cryptoNetAccount.setSeedId(10203024L);
cryptoNetAccounts.add(cryptoNetAccount);
cryptoNetAccountsSpinner?.setAndroidLayout() //Set the defaul simple spinner android
cryptoNetAccountsSpinner?.setCryptoAccountItems(cryptoNetAccounts)
cryptoNetAccountsSpinner?.initCryptoNetAccountAdapter() //Init the specified adaper
cryptoNetAccountsSpinner?.selectFirstItem() //Select the firts item in the spinner
cryptoNetAccountsSpinner?.onAccountNotExists(object : CryptoNetAccountsSpinner.OnAccountNotExists {
override fun onAccountNotExists(field: View) {
globalActivity.runOnUiThread(object: Runnable{
override fun run() {
ToastIt.showShortToast(globalActivity,"onAccountNotExists")
}
})
}
})
cryptoNetAccountsSpinner?.onAccountExists(object: CryptoNetAccountsSpinner.OnAccountExists{ //validateExistBitsharesAccountRequest
override fun onAccountExists(field: View) {
globalActivity.runOnUiThread(object: Runnable{
override fun run() {
ToastIt.showShortToast(globalActivity,"onAccountExists")
}
})
}
})
cryptoNetAccountsSpinner?.onItemSelectedListener(object: CryptoNetAccountsSpinner.OnItemSelectedListener{
override fun onItemSelectedListener(cryptoNetAccount: CryptoNetAccount) {
ToastIt.showShortToast(globalActivity,"onItemSelectedListener") //Comment this to see other toasts
/*
* Get the current crypto account selected
* */
var cryptoNetAccount:CryptoNetAccount = cryptoNetAccountsSpinner?.getCryptoNetAccountSelected()!!
ToastIt.showLongToast(globalActivity,"CryptoNetAccount obtained on onItemSelectedListener") //Comment this to see other toasts
cryptoNetAccountsSpinner?.validateExistBitsharesAccountRequest()
}
})
}
}

View file

@ -1,94 +0,0 @@
package cy.agorise.crystalwallet.tests.activities.dialogs
import android.os.Bundle
import android.widget.Toast
import cy.agorise.crystalwallet.R
import cy.agorise.crystalwallet.activities.CustomActivity
import cy.agorise.crystalwallet.dialogs.material.CrystalDialog
import cy.agorise.crystalwallet.dialogs.material.NegativeResponse
import cy.agorise.crystalwallet.dialogs.material.PositiveResponse
/*
* Class to test CrystalDialog
* */
class Test_CrystalDialogActivity : CustomActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.empty_activity)
//show()
//showOKDialog()
//showOKCancelDialog()
//showProgressIndeterminate()
}
/*
*
* Show the simplest dialog
*
* */
fun show(){
var crytalDialog:CrystalDialog = CrystalDialog(this)
crytalDialog.setTitle("Title")
crytalDialog.setText("Text")
crytalDialog.show()
//crytalDialog.dismiss()
}
/*
*
* Show the accept dialog
*
* */
fun showOKDialog(){
var crytalDialog:CrystalDialog = CrystalDialog(this)
crytalDialog.setTitle("Title")
crytalDialog.setText("Text")
crytalDialog.positiveResponse = object:PositiveResponse{
override fun onPositive() {
Toast.makeText(globalActivity, "CrystalDialog Positive clicked", Toast.LENGTH_LONG).show()
}
}
crytalDialog.show()
}
/*
*
* Show the accept and cancel dialog
*
* */
fun showOKCancelDialog(){
var crytalDialog:CrystalDialog = CrystalDialog(this)
crytalDialog.setTitle("Title")
crytalDialog.setText("Text")
crytalDialog.positiveResponse = object:PositiveResponse{
override fun onPositive() {
Toast.makeText(globalActivity, "CrystalDialog Positive clicked", Toast.LENGTH_LONG).show()
}
}
crytalDialog.negativeResponse = object:NegativeResponse{
override fun onNegative() {
Toast.makeText(globalActivity, "CrystalDialog Negative clicked", Toast.LENGTH_LONG).show()
}
}
crytalDialog.show()
}
/*
*
* Show the indeterminate dialog with text
*
* */
fun showProgressIndeterminate(){
var crytalDialog:CrystalDialog = CrystalDialog(this)
crytalDialog.setText("Loading...")
crytalDialog.progress()
crytalDialog.show()
}
}

View file

@ -1,33 +0,0 @@
package cy.agorise.crystalwallet.tests.activities.dialogs
import android.os.Bundle
import cy.agorise.crystalwallet.R
import cy.agorise.crystalwallet.activities.CustomActivity
import cy.agorise.crystalwallet.dialogs.material.DialogMaterial
/*
* Class to test DialogMaterial.kt
* */
class Test_DialogMaterialActivity : CustomActivity() {
/*
* Object to be tested
* */
lateinit var dialogMaterial: DialogMaterial;
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.empty_activity)
}
/*
* This class can not be instantiate,
* this methos is commented to prevent compilation error, if uncommented it should
* throw error compilations and based on this this assertion is complete
*
* */
fun instiantiation(){
//dialogMaterial = DialogMaterial(this)
}
}

View file

@ -1,42 +0,0 @@
package cy.agorise.crystalwallet.tests.activities.dialogs
import android.os.Bundle
import android.view.View
import cy.agorise.crystalwallet.R
import cy.agorise.crystalwallet.activities.CustomActivity
import kotlinx.android.synthetic.main.empty_activity.*
/*
* Unit test for class GIFView
* */
class Test_GIFActivity : CustomActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.empty_activity)
/*
* For testings purpouses
* */
gifView.visibility = View.VISIBLE
load()
//loadWithContainer()
}
/*
* Load normaly the gif
* */
fun load(){
gifView.load(R.raw.burbujas)
}
/*
* Load with fit into container
* */
fun loadWithContainer(){
gifView.centerCrop()
gifView.load(R.raw.burbujas)
}
}

View file

@ -1,73 +0,0 @@
package cy.agorise.crystalwallet.tests.activities.dialogs
import android.os.Bundle
import android.widget.Toast
import cy.agorise.crystalwallet.activities.CustomActivity
import cy.agorise.crystalwallet.activities.LoadingActivity
/*
* Class to test LoadingActivity
* */
class Test_LoadingActivity : CustomActivity(){
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
show()
//withTimer()
//onLoadingClose()
//onLoadingReady()
//sizeInLoadingIcon()
}
/*
* Show the simple loading graphic
* */
fun show(){
LoadingActivity.show(globalActivity)
//LoadingActivity.dismiss() //For testing porpouse
}
/*
* Loading with timer
* */
fun withTimer(){
LoadingActivity.closeOnTime(3)
LoadingActivity.show(globalActivity)
}
/*
* Listener when the loading window is closed
* */
fun onLoadingClose(){
LoadingActivity.closeOnTime(3)
LoadingActivity.onLoadingClosed(object : LoadingActivity.LoadingClosed{
override fun onLoadingClosed() {
Toast.makeText(globalActivity, "onLoadingClosed event fired", Toast.LENGTH_LONG).show()
}
})
LoadingActivity.show(globalActivity)
}
/*
* Listener when the loading window is resume
* */
fun onLoadingReady(){
LoadingActivity.onLoadingReady(object : LoadingActivity.LoadingReady{
override fun onLoadingReady() {
Toast.makeText(globalActivity, "onLoadingReady event fired", Toast.LENGTH_LONG).show()
}
})
LoadingActivity.show(globalActivity)
}
/*
* Set specified size to the loading icon
* */
fun sizeInLoadingIcon(){
LoadingActivity.loadingIconSize(30,30)
LoadingActivity.show(globalActivity)
}
}

View file

@ -1,21 +0,0 @@
package cy.agorise.crystalwallet.tests.activities.dialogs
import android.os.Bundle
import cy.agorise.crystalwallet.activities.CustomActivity
/*
* Class to test all network implementation
* */
class Test_NetworkActivity:CustomActivity(){
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
}
fun testServerConnection(){
}
}

View file

@ -1,32 +0,0 @@
package cy.agorise.crystalwallet.tests.activities.dialogs
import android.os.Bundle
import cy.agorise.crystalwallet.R
import cy.agorise.crystalwallet.activities.CustomActivity
import cy.agorise.crystalwallet.dialogs.material.ToastIt
class Test_ToastActivity : CustomActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.empty_activity)
//showShort()
showLongShort()
}
/*
* Show simple short toast
* */
fun showShort(){
ToastIt.showShortToast(this,"showShortToast")
}
/*
* Show simple short toast
* */
fun showLongShort(){
ToastIt.showShortToast(this,"showLongShort")
}
}

View file

@ -1,49 +0,0 @@
package cy.agorise.crystalwallet.tests.activities.dialogs
import android.net.Uri
import android.os.Bundle
import android.view.View
import cy.agorise.crystalwallet.R
import cy.agorise.crystalwallet.activities.CustomActivity
import kotlinx.android.synthetic.main.empty_activity.*
/*
* Class for test VideoExView
* */
class Test_VideoActivity : CustomActivity() {
/*
* cy.agorise.crystalwallet.views.natives.VideoViewEx
* should be used as view to get the new implementations
* */
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.empty_activity)
/*
* For testing purpouses
* */
video.visibility = View.VISIBLE
//play()
playIndeterminate()
}
/*
* Just one time play
* */
fun play(){
video.setVideoRaw(R.raw.appbar_background)
video.start()
}
/*
* Just one time play
* */
fun playIndeterminate(){
video.setVideoRaw(R.raw.appbar_background)
video.playContinius()
}
}