Welcome to Habanero Land!
Register
|
Login
Overview
Customer Feedback
Habanero Team
Habanero Features
Guided Tour
Object Relational Mapping (ORM)
Firestarter
One Application for Desktop & Web
Agile Development & Prototyping
Generating User Interfaces
Compatibility
Licensing & Support
Tutorials
Beginner
Intermediate
Advanced
Demo Videos
Beginners Demo Video
Download
Habanero Download
Tutorials Download
Forum
Blogs
Support
Community
Graph Stats
Top Visits & Downloads
You are here:
Blogs
So, why do you need to
register
to download Habanero and access the additional materials?
The
success
of any open source project is based on the
community
built around it. So go ahead,
register
/
login
and
get involved
!
Please wait...
Please wait...
Unit Testing WPF Bindings - BindingFinder
Dec
16
Thu
Posted By
Andrew
on
Thursday, December 16, 2010
72
Views
Share
This is the second blog in a series of blogs I have put together whilst trying to find a solution for unit testing WPF Bindings.
It’s time for a second attempt at testing the bindings on a WPF window. I don’t think my first attempt was a complete failure but, I am sure there must be a better way to solve this problem. Back to the internet to see what else is out there.
After some digging around, I found a little utility application, called “BindingFinder”, written by Rob Reylea. The source code is can be downloaded from his blog (
http://blogs.windowsclient.net/rob_relyea/
). At first glance it looks like the code opens a Xaml file and scans the contents for bindings. What I like about this is the fact that you won’t have to create a window and open it to get the bindings. I am not mad about opening windows during a unit test as it introduces a number of other problems to consider:
How to handle threading differences between the unit test runner and the WPF application
How to run the tests in a continuous integration environment
The original snippet of code on Rob’s blog that got me interested has turned into something bigger and more complicated in the “BindingFinder” utility. After having a play around with the code, I have decided that although this was a promising lead it would probably require a fair amount of effort to get what I wanted out of the code and would also introduce dependencies on file paths etc. I think I am going to leave this code for the time being and see what else is out there.
Categories
Unit Testing
,
.NET
Please wait...
Top Viewed
Please wait...
1
Cross Thread Runner - Testing User Controls in an STA Thread with NUnit
2
Getting started with Habanero Testability
3
A delegated value Equality Comparer
4
TDD using Random data
Habanero Cloud
Please wait...
.net wpf
Archive
Please wait...
<<
Saturday, May 19, 2012
>>
Monthly
March, 2011 (1)
Yearly
2011 (1)
2010 (23)
This website is best viewed in Internet Explorer 7 & 8; Firefox 3.6.11; Opera 10.63; & Safari 4.
Overview
|
Tutorials
|
Download
|
Forum
|
Blogs
|
Support
|
Community
Privacy Statement
|
Terms Of Use
©Copyright 2007-2011 Chillisoft Solutions Services (Pty) Ltd