Package com.example.dhaka_metro_rail
Class BuyTicketUnitTest
java.lang.Object
com.example.dhaka_metro_rail.BuyTicketUnitTest
Unit tests for the BuyTicket activity.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate classInner class representing a mock Spinner. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate BuyTicketprivate android.widget.Spinnerprivate android.widget.Spinnerprivate android.widget.Spinnerprivate android.widget.Spinner -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetUp()Set up the test environment by initializing mock Spinners and injecting them into the activity.voidTest method to verify the retrieval of selected values from Spinners.
-
Field Details
-
mockSpinnerTicketType
private android.widget.Spinner mockSpinnerTicketType -
mockSpinnerTicketQuantity
private android.widget.Spinner mockSpinnerTicketQuantity -
mockSpinnerStartingStation
private android.widget.Spinner mockSpinnerStartingStation -
mockSpinnerEndingStation
private android.widget.Spinner mockSpinnerEndingStation -
buyTicketActivity
-
-
Constructor Details
-
BuyTicketUnitTest
public BuyTicketUnitTest()
-
-
Method Details
-
setUp
public void setUp()Set up the test environment by initializing mock Spinners and injecting them into the activity. -
testSpinnerSelections
public void testSpinnerSelections()Test method to verify the retrieval of selected values from Spinners.
-