Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Catel - Part 4 of n: Unit testing with Catel

, 28 Jan 2011 CPOL
This article explains how to write unit tests for MVVM using Catel.
Catel-04_01-unittesting.zip
src
Catel.Articles.04 - Unit testing
Models
Properties
Settings.settings
Resources
Images
add.png
delete.png
edit.png
group.png
UI
Data
Converters
ViewModels
Windows
Catel.Articles.04 - Unit testing.Test
Models
Properties
UI
ViewModels
Catel.Articles.Base
Data
Attributes
Properties
Settings.settings
Resources
Images
CatenaLogic.png
Preview.png
Run.png
ShowCode.png
UI
Controls
Helpers
ViewModels
Windows
Catel.Core
Attributes
ClassDiagrams
DataObjectBase.cd
SavableDataObjectBase.cd
Collections
Helpers
ComponentModel
Data
Attributes
Exceptions
Interfaces
Diagnostics
Extensions
Helpers
Exceptions
Helpers
IO
Exceptions
IoC
LLBLGen
Log4net
Appender
Extensions
Helpers
MVVM
Commands
Interfaces
Exceptions
Services
EventArgs
Exceptions
Interfaces
ViewModels
Attributes
Interfaces
Properties
Reflection
Exceptions
Extensions
Helpers
Runtime
Serialization
Attributes
Helpers
Security
Cryptography
Helpers
Catel.Examples.Models
Properties
Catel.Examples.PersonApplication
Properties
Settings.settings
Resources
Images
add.png
delete.png
edit.png
group.png
UI
Data
Converters
ViewModels
Windows
Catel.Examples.Silverlight
Properties
Resources
Images
add.png
delete.png
edit.png
group.png
UI
Data
Converters
Pages
ViewModels
Windows
Catel.Examples.Silverlight.Web
Catel.Examples.Silverlight.Web.csproj.user
ClientBin
Properties
Catel.FxCop
Catel.Silverlight
Diagnostics
log4net
Core
MVVM
Commands
Services
ViewModels
Properties
Catel.Core
Catel.Windows
Reflection
Themes
Generic
Assets
Old
Windows
Controls
Data
Converters
Helpers
Helpers
Catel.Silverlight.Test
Properties
Catel.Silverlight.Test.Web
Catel.Silverlight.Test.Web.csproj.user
ClientBin
Properties
Catel.snk
Catel.Templates.WpfApplication
Properties
Settings.settings
UI
Controls
ViewModels
Windows
Catel.Templates.WpfItemTemplates
Properties
UI
Controls
ViewModels
Windows
Catel.Test
Collections
Convert
Data
Helpers
IO
MVVM
UI
ViewModels
Properties
Reflection
Runtime
Serialization
Security
Cryptography
Test References
Catel.Windows.accessor
Windows
Data
Converters
Catel.vsmdi
Catel.Windows
ClassDiagrams
ViewModelBase.cd
Collections
Extensions
Helpers
MVVM
Commands
Services
Test
UI
ViewModels
Properties
Settings.settings
Resources
Images
Add.png
ClearOutput.png
Edit.png
Error.png
Loading.gif
Preview.png
Remove.png
Save.png
TipOfTheDay.png
Warning.png
Themes
Aero
ExpressionDark
Assets
Generic
Assets
Controls
Jetpack
Assets
background.png
Old
SunnyOrange
Assets
Windows
Controls
Extensions
LinkLabel
StackGrid
Data
Converters
Helpers
Documents
Extensions
Extensions
Helpers
Input
Markup
Media
Effects
EmptyEffect
EmptyEffect.fx
EmptyEffect.ps
EmptyEffect.fx
GrayscaleEffect
GrayscaleEffect.fx
GrayscaleEffect.ps
Extensions
Imaging
Extensions
Windows
DataWindow
TipOfTheDay
Local.testsettings
Settings.StyleCop
TraceAndTestImpact.testsettings
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.1
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Catel.Windows.Properties {
    using System;
    
    
    /// <summary>
    ///   A strongly-typed resource class, for looking up localized strings, etc.
    /// </summary>
    // This class was auto-generated by the StronglyTypedResourceBuilder
    // class via a tool like ResGen or Visual Studio.
    // To add or remove a member, edit your .ResX file then rerun ResGen
    // with the /str option, or rebuild your VS project.
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    internal class Resources {
        
        private static global::System.Resources.ResourceManager resourceMan;
        
        private static global::System.Globalization.CultureInfo resourceCulture;
        
        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal Resources() {
        }
        
        /// <summary>
        ///   Returns the cached ResourceManager instance used by this class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Resources.ResourceManager ResourceManager {
            get {
                if (object.ReferenceEquals(resourceMan, null)) {
                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Catel.Windows.Properties.Resources", typeof(Resources).Assembly);
                    resourceMan = temp;
                }
                return resourceMan;
            }
        }
        
        /// <summary>
        ///   Overrides the current thread's CurrentUICulture property for all
        ///   resource lookups using this strongly typed resource class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Globalization.CultureInfo Culture {
            get {
                return resourceCulture;
            }
            set {
                resourceCulture = value;
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Approved.
        /// </summary>
        internal static string ApprovementCaption {
            get {
                return ResourceManager.GetString("ApprovementCaption", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Specify.
        /// </summary>
        internal static string ChoiceSpecify {
            get {
                return ResourceManager.GetString("ChoiceSpecify", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Browse for file....
        /// </summary>
        internal static string CommandBrowseForFileBrowse {
            get {
                return ResourceManager.GetString("CommandBrowseForFileBrowse", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Add.
        /// </summary>
        internal static string CommandDataAdd {
            get {
                return ResourceManager.GetString("CommandDataAdd", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Add all.
        /// </summary>
        internal static string CommandDataAddAll {
            get {
                return ResourceManager.GetString("CommandDataAddAll", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Edit.
        /// </summary>
        internal static string CommandDataEdit {
            get {
                return ResourceManager.GetString("CommandDataEdit", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Remove.
        /// </summary>
        internal static string CommandDataRemove {
            get {
                return ResourceManager.GetString("CommandDataRemove", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Remove all.
        /// </summary>
        internal static string CommandDataRemoveAll {
            get {
                return ResourceManager.GetString("CommandDataRemoveAll", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Revert.
        /// </summary>
        internal static string CommandDataRevert {
            get {
                return ResourceManager.GetString("CommandDataRevert", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Sort.
        /// </summary>
        internal static string CommandDataSort {
            get {
                return ResourceManager.GetString("CommandDataSort", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Submit.
        /// </summary>
        internal static string CommandDataSubmit {
            get {
                return ResourceManager.GetString("CommandDataSubmit", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Synchronize.
        /// </summary>
        internal static string CommandDataSynchronize {
            get {
                return ResourceManager.GetString("CommandDataSynchronize", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Back.
        /// </summary>
        internal static string CommandNavigateBack {
            get {
                return ResourceManager.GetString("CommandNavigateBack", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Navigate to first item.
        /// </summary>
        internal static string CommandNavigateFirst {
            get {
                return ResourceManager.GetString("CommandNavigateFirst", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Next.
        /// </summary>
        internal static string CommandNavigateForward {
            get {
                return ResourceManager.GetString("CommandNavigateForward", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Go to address.
        /// </summary>
        internal static string CommandNavigateGo {
            get {
                return ResourceManager.GetString("CommandNavigateGo", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Home.
        /// </summary>
        internal static string CommandNavigateHome {
            get {
                return ResourceManager.GetString("CommandNavigateHome", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Navigate to last item.
        /// </summary>
        internal static string CommandNavigateLast {
            get {
                return ResourceManager.GetString("CommandNavigateLast", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Navigate to next item.
        /// </summary>
        internal static string CommandNavigateNext {
            get {
                return ResourceManager.GetString("CommandNavigateNext", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Open hyperlink.
        /// </summary>
        internal static string CommandNavigateOpenLinkUrl {
            get {
                return ResourceManager.GetString("CommandNavigateOpenLinkUrl", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Navigate to previous item.
        /// </summary>
        internal static string CommandNavigatePrevious {
            get {
                return ResourceManager.GetString("CommandNavigatePrevious", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Launch tip editor.
        /// </summary>
        internal static string CommandTipOfTheDayLaunchTipEditor {
            get {
                return ResourceManager.GetString("CommandTipOfTheDayLaunchTipEditor", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Preview.
        /// </summary>
        internal static string CommandTipOfTheDayPreview {
            get {
                return ResourceManager.GetString("CommandTipOfTheDayPreview", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Show next tip.
        /// </summary>
        internal static string CommandTipOfTheDayShowNextTip {
            get {
                return ResourceManager.GetString("CommandTipOfTheDayShowNextTip", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Apply.
        /// </summary>
        internal static string CommandWindowApply {
            get {
                return ResourceManager.GetString("CommandWindowApply", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Cancel.
        /// </summary>
        internal static string CommandWindowCancel {
            get {
                return ResourceManager.GetString("CommandWindowCancel", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Clear.
        /// </summary>
        internal static string CommandWindowClear {
            get {
                return ResourceManager.GetString("CommandWindowClear", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Close.
        /// </summary>
        internal static string CommandWindowClose {
            get {
                return ResourceManager.GetString("CommandWindowClose", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Copy to clipboard.
        /// </summary>
        internal static string CommandWindowCopyToClipboard {
            get {
                return ResourceManager.GetString("CommandWindowCopyToClipboard", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to OK.
        /// </summary>
        internal static string CommandWindowOK {
            get {
                return ResourceManager.GetString("CommandWindowOK", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Refresh.
        /// </summary>
        internal static string CommandWindowRefresh {
            get {
                return ResourceManager.GetString("CommandWindowRefresh", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Reset layout.
        /// </summary>
        internal static string CommandWindowResetLayout {
            get {
                return ResourceManager.GetString("CommandWindowResetLayout", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Comments.
        /// </summary>
        internal static string Comments {
            get {
                return ResourceManager.GetString("Comments", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Are you sure?.
        /// </summary>
        internal static string ConfirmationTitle {
            get {
                return ResourceManager.GetString("ConfirmationTitle", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Are you sure you want to close the editor?
        ///
        ///All data that has not yet been saved will be lost. Make sure to save you data first if you want to keep your changes..
        /// </summary>
        internal static string ConfirmCloseTipOfTheDayEditor {
            get {
                return ResourceManager.GetString("ConfirmCloseTipOfTheDayEditor", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Empty.
        /// </summary>
        internal static string Empty {
            get {
                return ResourceManager.GetString("Empty", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Error.
        /// </summary>
        internal static string ErrorTitle {
            get {
                return ResourceManager.GetString("ErrorTitle", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Failed.
        /// </summary>
        internal static string Failed {
            get {
                return ResourceManager.GetString("Failed", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to The following warnings and/or errors were found (hover to view):.
        /// </summary>
        internal static string InfoBarMessageControlErrorTitle {
            get {
                return ResourceManager.GetString("InfoBarMessageControlErrorTitle", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Information.
        /// </summary>
        internal static string InfoTitle {
            get {
                return ResourceManager.GetString("InfoTitle", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Initialized view model.
        /// </summary>
        internal static string InitializedViewModel {
            get {
                return ResourceManager.GetString("InitializedViewModel", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Initializing view model.
        /// </summary>
        internal static string InitializingViewModel {
            get {
                return ResourceManager.GetString("InitializingViewModel", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Modify.
        /// </summary>
        internal static string Modify {
            get {
                return ResourceManager.GetString("Modify", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Change the text below.
        /// </summary>
        internal static string MultiLineInputWindowExplanation {
            get {
                return ResourceManager.GetString("MultiLineInputWindowExplanation", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Make a choice.
        /// </summary>
        internal static string MultipleChoiceWindowTitle {
            get {
                return ResourceManager.GetString("MultipleChoiceWindowTitle", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to No.
        /// </summary>
        internal static string No {
            get {
                return ResourceManager.GetString("No", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Please wait.
        /// </summary>
        internal static string PleaseWait {
            get {
                return ResourceManager.GetString("PleaseWait", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to An error occurred while saving the help mapping file.
        /// </summary>
        internal static string SaveHelpMappingFailed {
            get {
                return ResourceManager.GetString("SaveHelpMappingFailed", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Warning.
        /// </summary>
        internal static string WarningTitle {
            get {
                return ResourceManager.GetString("WarningTitle", resourceCulture);
            }
        }
        
        /// <summary>
        ///   Looks up a localized string similar to Yes.
        /// </summary>
        internal static string Yes {
            get {
                return ResourceManager.GetString("Yes", resourceCulture);
            }
        }
    }
}

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 Code Project Open License (CPOL)

Share

About the Author

Geert van Horrik
Software Developer CatenaLogic
Netherlands Netherlands
I am Geert van Horrik, and I have studied Computer Science in the Netherlands.
 
I love to write software using .NET (especially the combination of WPF and C#). I am also the lead developer of Catel, an open-source application development framework for WPF, Silverlight, WP7 and WinRT with the focus on MVVM.
 
I have my own company since January 1st 2007, called CatenaLogic. This company develops commercial and non-commercial software.
 
To download (or buy) applications I have written, visit my website: http://www.catenalogic.com
Follow on   Twitter

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.141220.1 | Last Updated 28 Jan 2011
Article Copyright 2011 by Geert van Horrik
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid