From e3eeb76f0e4b64a53063b127f9e37790ad019765 Mon Sep 17 00:00:00 2001 From: dtvv Date: Mon, 3 Sep 2018 09:18:48 -0600 Subject: [PATCH] Remove testing cases --- app/src/main/AndroidManifest.xml | 19 +--- .../dialogs/Test_CryptoNetAccountSpinner.kt | 97 ------------------- .../dialogs/Test_CrystalDialogActivity.kt | 94 ------------------ .../dialogs/Test_DialogMaterialActivity.kt | 33 ------- .../activities/dialogs/Test_GIFActivity.kt | 42 -------- .../dialogs/Test_LoadingActivity.kt | 73 -------------- .../dialogs/Test_NetworkActivity.kt | 21 ---- .../activities/dialogs/Test_ToastActivity.kt | 32 ------ .../activities/dialogs/Test_VideoActivity.kt | 49 ---------- 9 files changed, 3 insertions(+), 457 deletions(-) delete mode 100644 app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_CryptoNetAccountSpinner.kt delete mode 100644 app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_CrystalDialogActivity.kt delete mode 100644 app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_DialogMaterialActivity.kt delete mode 100644 app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_GIFActivity.kt delete mode 100644 app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_LoadingActivity.kt delete mode 100644 app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_NetworkActivity.kt delete mode 100644 app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_ToastActivity.kt delete mode 100644 app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_VideoActivity.kt diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index d77e761..0258a50 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -17,7 +17,9 @@ android:supportsRtl="true" android:configChanges="locale" android:theme="@style/AppTheme"> - + @@ -103,21 +105,6 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_CryptoNetAccountSpinner.kt b/app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_CryptoNetAccountSpinner.kt deleted file mode 100644 index daab83a..0000000 --- a/app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_CryptoNetAccountSpinner.kt +++ /dev/null @@ -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 = 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() - } - }) - } -} \ No newline at end of file diff --git a/app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_CrystalDialogActivity.kt b/app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_CrystalDialogActivity.kt deleted file mode 100644 index c1d2138..0000000 --- a/app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_CrystalDialogActivity.kt +++ /dev/null @@ -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() - } -} \ No newline at end of file diff --git a/app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_DialogMaterialActivity.kt b/app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_DialogMaterialActivity.kt deleted file mode 100644 index b8068bf..0000000 --- a/app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_DialogMaterialActivity.kt +++ /dev/null @@ -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) - } -} \ No newline at end of file diff --git a/app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_GIFActivity.kt b/app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_GIFActivity.kt deleted file mode 100644 index a0019db..0000000 --- a/app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_GIFActivity.kt +++ /dev/null @@ -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) - } -} \ No newline at end of file diff --git a/app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_LoadingActivity.kt b/app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_LoadingActivity.kt deleted file mode 100644 index 3c04a94..0000000 --- a/app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_LoadingActivity.kt +++ /dev/null @@ -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) - } -} \ No newline at end of file diff --git a/app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_NetworkActivity.kt b/app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_NetworkActivity.kt deleted file mode 100644 index b623129..0000000 --- a/app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_NetworkActivity.kt +++ /dev/null @@ -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(){ - - - } -} \ No newline at end of file diff --git a/app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_ToastActivity.kt b/app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_ToastActivity.kt deleted file mode 100644 index c4e5a28..0000000 --- a/app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_ToastActivity.kt +++ /dev/null @@ -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") - } -} \ No newline at end of file diff --git a/app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_VideoActivity.kt b/app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_VideoActivity.kt deleted file mode 100644 index 51ebc55..0000000 --- a/app/src/main/java/cy/agorise/crystalwallet/tests/activities/dialogs/Test_VideoActivity.kt +++ /dev/null @@ -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() - } -} \ No newline at end of file