55 lines
2.2 KiB
Kotlin
55 lines
2.2 KiB
Kotlin
/*
|
|
* // Copyright (c) 2024 ShanMukha Innovations Pvt. Ltd. All rights reserved.
|
|
* // Notice: All information contained herein is, and remains
|
|
* // the property of ShanMukha Innovations Pvt. Ltd. and its suppliers,
|
|
* // if any. The intellectual and technical concepts contained
|
|
* // herein are proprietary to ShanMukha Innovations Pvt. Ltd.
|
|
* // and its suppliers and may be covered by Indian and Foreign Patents,
|
|
* // patents in process, and are protected by trade secret or copyright law.
|
|
* // Dissemination of this information or reproduction of this material
|
|
* // is strictly forbidden unless prior written permission is obtained
|
|
* // from ShanMukha Innovations Pvt. Ltd.
|
|
*/
|
|
|
|
package com.example.hpostesting
|
|
|
|
import androidx.test.core.app.ActivityScenario
|
|
import androidx.test.espresso.Espresso.onView
|
|
import androidx.test.espresso.matcher.ViewMatchers.withId
|
|
|
|
import androidx.test.ext.junit.runners.AndroidJUnit4
|
|
//import com.example.hpostesting.R
|
|
import com.example.hpostesting.presentation.assurance.AssuranceControlsActivity
|
|
import `in`.sminnovations.hpostesting.databinding.ActivityAssuranceControlsBinding
|
|
import org.junit.Test
|
|
import org.junit.runner.RunWith
|
|
|
|
import org.junit.Assert.*
|
|
|
|
@RunWith(AndroidJUnit4::class)
|
|
class AssuranceControlsActivityTest {
|
|
//
|
|
// @Test
|
|
// fun testViewBinding() {
|
|
// val activityScenario = ActivityScenario.launch(AssuranceControlsActivity::class.java)
|
|
// activityScenario.onActivity { activity ->
|
|
// assertNotNull(activity.binding)
|
|
// assertEquals(ActivityAssuranceControlsBinding::class.java, activity.binding.javaClass)
|
|
// }
|
|
// }
|
|
//
|
|
// @Test
|
|
// fun testSharedPreferencesInitialization() {
|
|
// val activityScenario = ActivityScenario.launch(AssuranceControlsActivity::class.java)
|
|
// activityScenario.onActivity { activity ->
|
|
// assertNotNull(activity.sharedPreference)
|
|
// assertEquals("HEMOCUBE", activity.sharedPreference.getString("HEMOCUBE", null))
|
|
// }
|
|
// }
|
|
|
|
// @Test
|
|
// fun testFragmentTransaction() {
|
|
// val activityScenario = ActivityScenario.launch(AssuranceControlsActivity::class.java)
|
|
// onView(withId(R.id.fgAssuranceControls)).check(matches(isDisplayed())) // Using Espresso for UI verification
|
|
// }
|
|
} |