/* As a user I need see a screen So that I can see my computation results */ @Test public void testCurrencyList() { CurrencyFragment wheel = (CurrencyFragment) activity.getFragmentManager().findFragmentById(R.id.currency_wheel); // Then I should see list of currency option assertTrue(wheel.isAdded()); assertNotNull(wheel); }
/* As a user I need to see numbered buttons so that I can do numeric computations */ @Test public void testKeypad() { // Then I should see numbered buttons // And basic calculator operations KeypadFragment keypad = (KeypadFragment) activity.getFragmentManager().findFragmentById(R.id.keypad); assertTrue(keypad.isAdded()); assertNotNull(keypad); }
/* As a user I need see a screen So that I can see my computation results */ @Test public void testScreen() { DisplayFragment screen = (DisplayFragment) activity.getFragmentManager().findFragmentById(R.id.screen); // Then I should see a space for computation results assertTrue(screen.isAdded()); assertNotNull(screen); // And space should contains initial value of '0' assertEquals("0", screen.getDisplayText()); }