Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Before
- public void setup() {
- mActivity = Robolectric.buildActivity(MainActivity.class).create().get();
- mKeyboard = new Scanner(System.in);
- }
- @Test
- public void userInteraction() {
- System.out.println("Enter Username and press Enter : ");
- mUsername = mKeyboard.nextLine();
- System.out.println("Enter Password and press Enter : ");
- mPassword = mKeyboard.nextLine();
- System.out.println("Trying to login...");
- }
- String data = "Users Input";
- System.setIn(new ByteArrayInputStream(data.getBytes()));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement