Up Query code samples
DevForce 2010 Resource Center » Code samples » Query code samples » Code sample: Querying (Silverlight)

Code sample: Querying (Silverlight)

Last modified on August 15, 2012 17:20

A sample showing various queries written as Silverlight unit tests.


Problem

You'd like to learn more about asynchronous queries in Silverlight.  You'd also like to learn how to perform unit testing in Silverlight.

Solution

The sample solution uses simple unit tests as the vehicle to show queries and their results.  You'll learn to use the Silverlight Unit Test Framework, along with the IdeaBlade "test framework" which extends the Silverlight framework to make it easy to write unit tests targeting both desktop and Silverlight applications.

To get started, open up the Querying.SL project and take a look around.  To run the tests, just hit F5.  You should see a browser screen such as the following showing that all tests passed.

Querying test results

IdeaBlade.TestFramework

You'll notice a supporting project in the solution called IdeaBlade.TestFramework.SL.  This contains the source code for the open source test framework under development.  The source code is licensed under the MIT open source license.  The test framework helps in writing unit tests targeting both the desktop and Silverlight applications.  This source code is provided "as is".

IdeaBlade.Extensions

Another supporting project whose source code is licensed under the MIT open source license.  The extensions are used by the test framework to provide a more fluent API.  This source code is provided "as is".

Prerequisites

The Silverlight 4 Toolkit

Created by DevForce on May 03, 2011 11:25

This wiki is licensed under a Creative Commons 2.0 license. XWiki Enterprise 3.2 - Documentation. Copyright © 2015 IdeaBlade