Exercise 3: Testing the Windows Phone 7 Application

In this exercise, you will test the Windows Phone 7 application.

Task 1 – Testing the Application’ Authorization Functionality in Windows Phone 7 Emulator

In this task, you will test the Windows Phone 7 application using the Windows Phone 7 emulator.

  1. In the WP7.Security.FBA solution, select Windows Phone 7 Emulator in the deployment location dropdown list.
  2. In the WP7.Security.FBA solution, press F5.
  3. The Windows Phone application starts in the emulator and displays the items from the Maintenance Announcements SharePoint list.

    Figure 4

    Application displaying announcements from the SharePoint list

  4. Click on one of the maintenance announcements in the list to select it.
  5. The Windows Phone application displays the details for the selected maintenance announcement from the SharePoint list.

    Figure 5

    Application displaying announcement details

  6. Click the emulator’s back button to return to the list of announcements.
  7. In the WP7.Security.FBA in Visual Studio press Shift-F5 to stop debugging.

Task 2 -Testing the Application’s Failed Authorization Functionality in Windows Phone 7 Emulator

In this task, you will test the Windows Phone 7 application with an incorrect user name.

  1. In the WP7.Security.FBA project, in the Utilities folder, open the Constants.cs file.
  2. Change the value for the USER_NAME to a username that does not have permissions on the SharePoint web site. For this task the user name does not have to exist on the server or in SharePoint.
  3. In the WP7.Security.FBA solution, press F5.
  4. The Windows Phone application starts in the emulator and displays the failed log in message.

    Figure 6

    Application displaying failed login message