Click here to Skip to main content
15,894,177 members
Articles / Programming Languages / C# 4.0

Unit Testing a Silverlight View Model Style Modal Popup

Rate me:
Please Sign up or sign in to vote.
4.76/5 (9 votes)
6 May 2010Ms-PL3 min read 53.6K   756   22  
An example of a View Model Style Modal Popup Unit Test.
  • mvvmunittestexample.zip
    • MVVMPopUp.sln
    • MVVMPopUp.Web
    • MVVMPopUp
      • App.xaml
      • App.xaml.cs
      • Bin
        • Debug
          • AppManifest.xaml
          • ar
            • System.Windows.Controls.resources.dll
          • bg
            • System.Windows.Controls.resources.dll
          • ca
            • System.Windows.Controls.resources.dll
          • cs
            • System.Windows.Controls.resources.dll
          • da
            • System.Windows.Controls.resources.dll
          • de
            • System.Windows.Controls.resources.dll
          • el
            • System.Windows.Controls.resources.dll
          • es
            • System.Windows.Controls.resources.dll
          • et
            • System.Windows.Controls.resources.dll
          • eu
            • System.Windows.Controls.resources.dll
          • fi
            • System.Windows.Controls.resources.dll
          • fr
            • System.Windows.Controls.resources.dll
          • he
            • System.Windows.Controls.resources.dll
          • hr
            • System.Windows.Controls.resources.dll
          • hu
            • System.Windows.Controls.resources.dll
          • id
            • System.Windows.Controls.resources.dll
          • it
            • System.Windows.Controls.resources.dll
          • ja
            • System.Windows.Controls.resources.dll
          • ko
            • System.Windows.Controls.resources.dll
          • lt
            • System.Windows.Controls.resources.dll
          • lv
            • System.Windows.Controls.resources.dll
          • Microsoft.Expression.Interactions.dll
          • Microsoft.Expression.Interactions.xml
          • ms
            • System.Windows.Controls.resources.dll
          • MVVMPopUp.dll
          • MVVMPopUp.xap
          • MVVMPopUpTestPage.html
          • nl
            • System.Windows.Controls.resources.dll
          • no
            • System.Windows.Controls.resources.dll
          • pl
            • System.Windows.Controls.resources.dll
          • pt
            • System.Windows.Controls.resources.dll
          • pt-BR
            • System.Windows.Controls.resources.dll
          • ro
            • System.Windows.Controls.resources.dll
          • ru
            • System.Windows.Controls.resources.dll
          • sk
            • System.Windows.Controls.resources.dll
          • sl
            • System.Windows.Controls.resources.dll
          • sr-Cyrl-CS
            • System.Windows.Controls.resources.dll
          • sr-Latn-CS
            • System.Windows.Controls.resources.dll
          • sv
            • System.Windows.Controls.resources.dll
          • System.Windows.Controls.dll
          • System.Windows.Controls.xml
          • System.Windows.Interactivity.dll
          • System.Windows.Interactivity.xml
          • th
            • System.Windows.Controls.resources.dll
          • tr
            • System.Windows.Controls.resources.dll
          • uk
            • System.Windows.Controls.resources.dll
          • vi
            • System.Windows.Controls.resources.dll
          • zh-Hans
            • System.Windows.Controls.resources.dll
          • zh-Hant
            • System.Windows.Controls.resources.dll
        • Release
      • Classes
      • Converters
      • MainPage.xaml
      • MainPage.xaml.cs
      • MVVMPopUp.csproj
      • MVVMPopUp.csproj.user
      • PopUps
      • Properties
      • ViewModel
    • SilverlightTest1
      • App.xaml
      • App.xaml.cs
      • Bin
        • Debug
          • AppManifest.xaml
          • ar
            • System.Windows.Controls.resources.dll
          • bg
            • System.Windows.Controls.resources.dll
          • ca
            • System.Windows.Controls.resources.dll
          • cs
            • System.Windows.Controls.resources.dll
          • da
            • System.Windows.Controls.resources.dll
          • de
            • System.Windows.Controls.resources.dll
          • el
            • System.Windows.Controls.resources.dll
          • es
            • System.Windows.Controls.resources.dll
          • et
            • System.Windows.Controls.resources.dll
          • eu
            • System.Windows.Controls.resources.dll
          • fi
            • System.Windows.Controls.resources.dll
          • fr
            • System.Windows.Controls.resources.dll
          • he
            • System.Windows.Controls.resources.dll
          • hr
            • System.Windows.Controls.resources.dll
          • hu
            • System.Windows.Controls.resources.dll
          • id
            • System.Windows.Controls.resources.dll
          • it
            • System.Windows.Controls.resources.dll
          • ja
            • System.Windows.Controls.resources.dll
          • ko
            • System.Windows.Controls.resources.dll
          • lt
            • System.Windows.Controls.resources.dll
          • lv
            • System.Windows.Controls.resources.dll
          • Microsoft.Expression.Interactions.dll
          • Microsoft.Expression.Interactions.xml
          • Microsoft.Silverlight.Testing.dll
          • Microsoft.Silverlight.Testing.xml
          • Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.dll
          • Microsoft.VisualStudio.QualityTools.UnitTesting.Silverlight.xml
          • ms
            • System.Windows.Controls.resources.dll
          • MVVMPopUp.dll
          • nl
            • System.Windows.Controls.resources.dll
          • no
            • System.Windows.Controls.resources.dll
          • pl
            • System.Windows.Controls.resources.dll
          • pt
            • System.Windows.Controls.resources.dll
          • pt-BR
            • System.Windows.Controls.resources.dll
          • ro
            • System.Windows.Controls.resources.dll
          • ru
            • System.Windows.Controls.resources.dll
          • SilverlightTest1.dll
          • SilverlightTest1.xap
          • sk
            • System.Windows.Controls.resources.dll
          • sl
            • System.Windows.Controls.resources.dll
          • sr-Cyrl-CS
            • System.Windows.Controls.resources.dll
          • sr-Latn-CS
            • System.Windows.Controls.resources.dll
          • sv
            • System.Windows.Controls.resources.dll
          • System.Windows.Controls.dll
          • System.Windows.Controls.xml
          • System.Windows.Interactivity.dll
          • System.Windows.Interactivity.xml
          • TestPage.html
          • th
            • System.Windows.Controls.resources.dll
          • tr
            • System.Windows.Controls.resources.dll
          • uk
            • System.Windows.Controls.resources.dll
          • vi
            • System.Windows.Controls.resources.dll
          • zh-Hans
            • System.Windows.Controls.resources.dll
          • zh-Hant
            • System.Windows.Controls.resources.dll
      • Properties
      • SilverlightTest1.csproj
      • SilverlightTest1.csproj.user
      • Tests.cs
<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" EntryPointAssembly="MVVMPopUp" EntryPointType="MVVMPopUp.App" RuntimeVersion="4.0.50401.0">
  <Deployment.Parts>
    <AssemblyPart x:Name="MVVMPopUp" Source="MVVMPopUp.dll" />
    <AssemblyPart x:Name="Microsoft.Expression.Interactions" Source="Microsoft.Expression.Interactions.dll" />
    <AssemblyPart x:Name="System.Windows.Controls" Source="System.Windows.Controls.dll" />
    <AssemblyPart x:Name="System.Windows.Interactivity" Source="System.Windows.Interactivity.dll" />
  </Deployment.Parts>
</Deployment>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Microsoft Public License (Ms-PL)


Written By
Software Developer (Senior) http://ADefWebserver.com
United States United States
Michael Washington is a Microsoft MVP. He is a ASP.NET and
C# programmer.
He is the founder of
AiHelpWebsite.com,
LightSwitchHelpWebsite.com, and
HoloLensHelpWebsite.com.

He has a son, Zachary and resides in Los Angeles with his wife Valerie.

He is the Author of:

Comments and Discussions