CS 185C/286 - Lecture 7

Cover page image

Cay S. Horstmann

Lecture 7 Quiz 1

Put your answer into Piazza.

What is true about the setSchedules method in the Film class?

  1. It is called in FilmParser.
  2. It is called in FilmParserTest.
  3. It is not necessary since one can just call getSchedules.
  4. It is poor design since a Film should be immutable.

Lecture 7 Quiz 2

What is the result of the query http://mobile.cinequest.org/mobileCQ.php?type=schedules&day=2013-03-02?

  1. All films that play on March 2
  2. The user's schedule for March 2
  3. All program items that are scheduled for March 2
  4. All events that happen on March 2

Project Ideas

  1. Modernize Android client for Android 4, including tablets
  2. Improve device integration with Android and iPhone client: location, phone, schedule, contacts, etc.
  3. HTML5 Cinequest client
  4. Hemepath counter app
  5. Samsung S-Pen
  6. Port Cinequest app (films only, not schedule) to Windows phone

Today's Lecture/Lab

Testing Concepts

The Unit Testing Philosophy

JUnit Test Case

Testing For Exceptions


Mock Objects

Using JUnit Effectively

Android Testing Support

Reading Before Next Class


Spinner Test Tutorial Setup

  1. We will follow this tutorial.
  2. Open the Android SDK Manager and make sure that you have the Samples for SDK installed. If not, install them now. Don't install updates—that takes too long.
  3. Make a new Android project from existing sources. Select sdk/samples/android-version/Spinner inside your ADT. Be sure to check "Copy into workspace".
  4. Now follow the instructions at “To create a new test project for the SpinnerTest application, follow these steps: ”
  5. Complete the tutorial and answer the questions on the next slide.

Spinner Test Tutorial Questions