THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Davide Mauri

A place for my thoughts and experiences on SQL Server, Business Intelligence and .NET

QueryUnit v 0.0.0.7

Yesterday I’ve released a refreshed version of QueryUnit Proof-Of-Concept to fix some problems due to localization settings. Now all expected values are managed using the InvariantCulture culture.

Using the InvariantCulture Property
http://msdn.microsoft.com/en-us/library/4c5zdc6a.aspx

I’ve also added the support for “format” element so that from now on you can define how to format the data before the assertion gets evaluated, specifing the preferred format, just using the usual .NET formats:

Formatting Types
http://msdn.microsoft.com/en-us/library/fbxft59x(VS.71).aspx

In this way, for example, if yor query generates the number 1309047.1978 and you’re just interested in the first two decimal numbers, you just have to specify the value “##.00” as a format value:

<CellSetResult ordinal="0" type="Decimal" assertion="AreEqual" value="1309047.1978" format="##.00"/>

or

<CellSetResult ordinal="0" type="Decimal" assertion="AreEqual" value="1309047.20" format="##.00"/>

Happy testing!

UPDATE:

For those who ask: sorry I forgot to put the link to the tool [:)]. Here it is:
http://queryunit.codeplex.com/

Published Sunday, February 28, 2010 12:55 PM by Davide Mauri

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

No Comments

Leave a Comment

(required) 
(required) 
Submit

About Davide Mauri

Davide Mauri - MCP, MCAD, MCDBA, MCT, MVP on SQL Server - has worked with SQL Server since version 6.5, and his interests cover the whole platform, from the Relational Engine to Analysis Services, from architecture definition to performance tuning. He also has a strong knowledge of XML, .NET and the Object Oriented Design principles, which allows him to have the correct vision and experience to handle development of complex business intelligence solutions. Having worked as a Microsoft Certified Teacher for many years, Davide is able to pass all his knowledge to his co-workers, allowing his team to deliver high-quality solutions. He currently works as a Mentor for SolidQ and can be found speaking in many Italian and internationals events.

This Blog

Syndication

Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement