<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>javier.figueroa</title>
	<atom:link href="http://www.jfigueroa.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jfigueroa.org</link>
	<description>Mumbo Jumbo</description>
	<lastBuildDate>Sat, 26 Nov 2011 05:03:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>my 27 birthday</title>
		<link>http://www.jfigueroa.org/2011/my-27-birthday/</link>
		<comments>http://www.jfigueroa.org/2011/my-27-birthday/#comments</comments>
		<pubDate>Sat, 26 Nov 2011 04:54:21 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[thoughts]]></category>
		<category><![CDATA[vida tiempo]]></category>

		<guid isPermaLink="false">http://www.jfigueroa.org/?p=408</guid>
		<description><![CDATA[Como humanos, somos especiales y unicos, cada quien es cada quien. Sin embargo, somos iguales. Un inverosímil dilema que se sambuye en mi cabeza de jabón. Hoy como muchos otros viernes, viendome una película, con el amor dormido y con &#8230; <a href="http://www.jfigueroa.org/2011/my-27-birthday/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Como humanos, somos especiales y unicos, cada quien es cada quien. Sin embargo, somos iguales. Un inverosímil dilema que se sambuye en mi cabeza de jabón. Hoy como muchos otros viernes, viendome una película, con el amor dormido y con ojo despierto, me proporcionó las ganas de poner mis pensamientos en papel.</p>
<p>Sintiendome un poco sentimental pensé para mi que algún día dejare mi semilla en este planeta y quizá hombre o mujer o demás, aprecie mis pensamientos desde el año 2011.<br />
Viendo la película y trasponiendole mi vida no hubo forma de evadir mis más profundos sentimientos, el amor por los que amo. Mi padre, mi madre y Sophia. </p>
<p>Mi padre un hombre tan complejo, en su forma de hablar, en su forma de amar, en su forma de rezar, de pensar&#8230; de vivir&#8230; de todas las personas que he conocido en tan corta vida, no hay nadie al que conozca más y al mismo tiempo no, que a mi padre. Es difícil de describir, tan solo se que los recuerdos más gratos de mi vida me los dio el. Y con el paso del tiempo se que me has soltado las riendas y que eso solo lo entienden tus ojos y los míos. El día que no los vea&#8230; Tan solo tengo que cerrar los míos y verte sonreír. Te adoro mi viejo.</p>
<p>Mi madre&#8230; Creo que no me caben los sentimientos en los dedos para poder escribir. Una mujer sin atmósfera, sin delirios, con sonrisa de amor y hasta con un aire de bohemia. Cada vez que mis sentimientos me juegan un cruz, te siento a mi lado, como siempre lo has estado. Casi puedo rozar mis dedos en los rastros de mi nacimiento, y no consigo la forma de razonar tu entrega, tu amor. En estos últimos años tu y Papá han dejado en mi millones de retratos de felicidad y afecto. Te adoro.</p>
<p>Mi Sophia. Se que nunca lees estos escritos. No porque no quieres, sino por ese puente abismal de mil pies, en el cual tu y yo hemos construido este amor. Tu me diste refugio en esta tierra ya no tan extraña. Me enseñaste a entender malabares sociales que de la selva que vengo ya no aplican. Se tus problemas, se tus sueños, quizá te conozca más que tu a mi. Sin embargo, cada vez que me miras y me abrazas yo te ofrezco seguridad, amor y paz. Que a pesar de que aquel puente tenebroso se mueva, nuestra unión es más que el mar.</p>
<p>Futuro tu, si haz leído hasta aquí ya me conoces más, Javier del 2011, un poco de todo. Ahora sabes que no soy sin los que amo. Una sonrisa y abrazo.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jfigueroa.org/2011/my-27-birthday/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changes</title>
		<link>http://www.jfigueroa.org/2011/changes/</link>
		<comments>http://www.jfigueroa.org/2011/changes/#comments</comments>
		<pubDate>Wed, 18 May 2011 19:15:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[thoughts]]></category>

		<guid isPermaLink="false">http://www.jfigueroa.org/?p=371</guid>
		<description><![CDATA[I&#8217;m currently making big decisions, the life changing ones. I wanted to write a little about it just to get some things out of my head. During the life changing process I&#8217;m going through I&#8217;ve learned a thing or two &#8230; <a href="http://www.jfigueroa.org/2011/changes/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently making big decisions, the life changing ones. I wanted to write a little about it just to get some things out of my head.</p>
<p>During the life changing process I&#8217;m going through I&#8217;ve learned a thing or two about tech companies, the ones that are &#8220;growing&#8221; but don&#8217;t know how. In the past year or so I&#8217;ve been blessed with a lot of opportunities to do fun small and large projects in a day to day basis. This is great because I&#8217;ve acquired a lot of experience that I may have not been able to acquire if I worked in a bigger company, where my role would have been minimized to very specific tasks. I&#8217;m not going on a tangent here; this is very related to the growth of a company though. The lesson learned was:</p>
<p><em><strong>The more your software developers venture themselves in projects that go outside their comfort zone, the more they grow professionally, hence the company does too</strong></em>.</p>
<p>In my case I&#8217;ve been able to do so and with that I was able to help the company grow and produce cool things, gave exposure to my team within the company and most of all I made an impact in my team. I reaffirmed myself that learning is the first step to be a great developer, personally is the most important thing that should never stop happening in your career, and that teaching what you know is the second most important thing in order to be the best. Today, I follow great developers everywhere and see this trend. You&#8217;ll see it in between the lines (I should say tweets). Sadly though, I also see the opposite and for better or worse, it happens due to ignorance or maybe lack of effort, perhaps even lack of good management.</p>
<p>Software developers in the present day are hot commodities, and most companies, specially in the Valley and Bay area get this. They seem to attract the best and keep them. How do they do that? you may say: &#8220;it&#8217;s the salaries&#8221; or &#8220;it&#8217;s the perks&#8221;&#8230; yes that drives developers a little, but the truth though is that this developers go and stay in this companies because their managers and people making decisions are like-minded. They think the same, they are just as technical and are not afraid of rewarding their developers for being awesome.</p>
<p>As final thought, I want to say that my dream is very similar to that of many people, &#8220;be your own boss have your own company&#8221;, this however is a long shot that for some of us is worth the try. Having learned from my experiences these past couple of years, I can say that if I ever do achieve that dream, I will make the growth of my company driven by the growth of my developers. If my developers are awesome, my product will be awesome and everything else pretty much will do itself.</p>
<p>Javier</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jfigueroa.org/2011/changes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Software Tickets</title>
		<link>http://www.jfigueroa.org/2010/software-tickets/</link>
		<comments>http://www.jfigueroa.org/2010/software-tickets/#comments</comments>
		<pubDate>Thu, 23 Dec 2010 18:03:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[post]]></category>
		<category><![CDATA[software development tickets]]></category>

		<guid isPermaLink="false">http://www.jfigueroa.org/2010/software-tickets/</guid>
		<description><![CDATA[Working for a software company has taught me that developers exist not by experience level but by coffee flavor. Some of the most common flavors are: Those that think about writing code (vanilla) Those that think about how to write &#8230; <a href="http://www.jfigueroa.org/2010/software-tickets/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Working for a software company has taught me that developers exist not by experience level but by coffee flavor. Some of the most common flavors are:</p>
<ul>
<li>Those that think about writing code (vanilla)</li>
<li>Those that think about how to write the code (chocolate vanilla)</li>
<li>Those that think about how their code is going to fail when they write it (original blend)</li>
<li>and finally the ones that their code is going to fail when they write so they set up ticketing systems to remind them their code sucks (bad coffee)</li>
</ul>
<p>In my current software experience I&#8217;ve had the opportunity to interface with several of the last flavor. I don&#8217;t want to write a rant about this kind of software developers, I&#8217;m not going to. I do want to point out, that if you&#8217;re reading this and you, for a split second considered yourself a developer of this flavor, don&#8217;t keep reading. It&#8217;s already too late for you, or you&#8217;re too old (in your head) to change. You&#8217;ve set your ways and practicing bad techniques for your day to day development is something of the status quo&#8230; you were practically doomed since you started. Simply put you&#8217;re a lost case.</p>
<p>If you&#8217;re a youngster in software and are open to new ideas, you enjoy looking at good designed and planned software, then there&#8217;s still time for you to avoid falling into the abyss. I&#8217;m a firm believer that software developers and engineers will one way or another completely rule the earth (think about it for a second, it takes time to digest). If you see it the same way, it&#8217;s important for you to start using good practices and making sure everything you write is clean and solid. Making sure you&#8217;ll never have to see a software ticket in your career or at least very few.</p>
<p>I don&#8217;t feel like writing about good practices, there&#8217;re plenty of sites and blogs that do that. Please take sometime to read some articles that can help you improve your software engineering techniques, remember it&#8217;s for a greater good. Googling sometimes helps to get you in the right direction when you are starting a project.</p>
<p><img class="aligncenter" title="tickets dilbert" src="http://dilbert.com/dyn/str_strip/000000000/00000000/0000000/000000/00000/1000/800/1872/1872.strip.gif" alt="" width="640" height="199" /></p>
<p>Javier</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jfigueroa.org/2010/software-tickets/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Future</title>
		<link>http://www.jfigueroa.org/2010/the-future/</link>
		<comments>http://www.jfigueroa.org/2010/the-future/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 05:58:08 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[thoughts]]></category>

		<guid isPermaLink="false">http://www.jfigueroa.org/?p=327</guid>
		<description><![CDATA[Tonight I&#8217;m feeling a bit weird. It&#8217;s a mix of tiredness and cluelessness, it feels like venturing into a new universe but I&#8217;m not quite there yet. Going through some changes in my life, mostly positives, and accommodating accordingly. However, &#8230; <a href="http://www.jfigueroa.org/2010/the-future/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Tonight I&#8217;m feeling a bit weird. It&#8217;s a mix of tiredness and cluelessness, it feels like venturing into a new universe but I&#8217;m not quite there yet.</p>
<p>Going through some changes in my life, mostly positives, and accommodating accordingly. However, it is still a tremendous burden in my concience because sometimes it&#8217;s hard to tell whether what you do is right or wrong. Although it feel correct, people are always bound to feel hurt.</p>
<p>Computers are a great getaway from reality, at least it works for me. I feel like I belong in there, like I can be more than here, like I said its odd. Computers also make be feel somewhat immature, I know we humans are still evolving but machines now a days have so much more potential and most of us seem or want to ignore it.</p>
<p>The thing about machines is that they have no feelings&#8230; yet&#8230; something that has always amazed me. Understanding the binary language to which machines dance, and knowing the higher level of such, when will machines feel? will I enjoy the company of one? maybe instead of writing this he or she could just talk back to me or record my thoughts or just put me to sleep&#8230; maybe one day, hopefully.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jfigueroa.org/2010/the-future/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>La Bohemia</title>
		<link>http://www.jfigueroa.org/2009/la-bohemia/</link>
		<comments>http://www.jfigueroa.org/2009/la-bohemia/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 04:40:53 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[thoughts]]></category>

		<guid isPermaLink="false">http://www.jfigueroa.org/?p=320</guid>
		<description><![CDATA[Esta noche me encuentro escribiendo otra vez. Me hierve la sangre al sentir mis ganas de escribir y el deseo de expresar cualquiera que sea lo que tenga que expresar en forma de letras. Hace ya algún tiempo no escribo &#8230; <a href="http://www.jfigueroa.org/2009/la-bohemia/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Esta noche me encuentro escribiendo otra vez. Me hierve la sangre al sentir mis ganas de escribir y el deseo de expresar cualquiera que sea lo que tenga que expresar en forma de letras. Hace ya algún tiempo no escribo ni una palabra que tenga sentido más allá del mundo mundano técnico, de mi conocimiento calculado-científico, donde las emociones y el existir son solo momentos débiles de nosotros los insignificantes humanos, sin el poder de la luz. Este lado de mi me encanta! El lado en el cual la ciencia y la tecnología se convierten en los juguetes del año pasado y las emociones y sentimientos en el nuevo juguete de hoy.</p>
<p>Apasionante como la sangre que brota de las heridas del naufrago de un amor imposible, donde la única salida es el intento mortal, salen mis palabras de mi mente y se convierten en poderosas esculturas de bronce indestructibles y eternas. Es extraño que después de tanto tiempo sin la tinta ni el papel, vea el despliegue de mis vocales formar tan fluido río de frases, donde el otro lado de mi irreconocible me encontraría. Alegría! Se siente en mi cuerpo. Alegría! Es volver a la expresión humana.</p>
<p>Esta noche donde el supuesto invierno nunca llegó, en la mitad del mundo y en el centro del calor, es fácil desprenderse de la realidad y mostrarse como es, puro, sin colgandejos ni educación, desnudo yo y la noche, desnudo yo y nadie más.</p>
<p>Quizás vuelva a tocar el libro que hace ya años empecé, quizás escriba más que antes, quizás nunca vuelva a escribir, las posibilidades son infinitas cuando te agarran las animas del amor a la cultura y de la pasión por la Bohemia.</p>
<p>Si, la Bohemia, una dama de unos ocho metros que se aparece en mi cuarto a eso de las once de la noche me acosa al papel. Ella me mira con ojos de perdida y con hambre de aventura y sed de libertad. Su piel es dura cual gitana, demostrando experiencia y al mismo tiempo frialdad. La Bohemia me acoge como si necesitara de mi, pero sin necesitar de mi.</p>
<p>Esta noche no fue diferente a las demás, ella vino me miro profundamente con esos ojos estelares, me susurro unas palabras y aquí me dejo…</p>
<p>Ella me dijo:</p>
<p>- Escribe Javi, escribe…</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jfigueroa.org/2009/la-bohemia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silverlight Functional Testing with WebAii Framework</title>
		<link>http://www.jfigueroa.org/2009/silverlight-functional-testing-with-webaii-framework/</link>
		<comments>http://www.jfigueroa.org/2009/silverlight-functional-testing-with-webaii-framework/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 00:30:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[thoughts]]></category>

		<guid isPermaLink="false">http://www.jfigueroa.org/?p=289</guid>
		<description><![CDATA[Summary In this article you&#8217;ll get a glimpse of how the UltiStudio development team is tackleing the functionality tests for the product. If you are a Silverlight developer or are familiar with Silverlight you know that testing Silverlight applications for &#8230; <a href="http://www.jfigueroa.org/2009/silverlight-functional-testing-with-webaii-framework/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>Summary</strong></p>
<p>In this article you&#8217;ll get a glimpse of how the UltiStudio development team is tackleing the functionality tests for the product. If you are a Silverlight developer or are familiar with Silverlight you know that testing Silverlight applications for their functionality is not a trial task. This article will expose you to a young framework developed by the Art of Test people. Its name is WebAii.</p>
<p><strong>Requirements</strong></p>
<p>You should have the latest Visual Studio installed. MbUnit and TestDriven.Net should also be installed. Additionally, you should know how to create a Test Project and how to add Test Fixtures to it.</p>
<p><strong>Who will benefit from this Article?</strong></p>
<p>Anyone that works with Silverlight and is desperately looking for a way of functionally tests their applications.</p>
<p>WebAii, Here we go! ( with Super Mario voice :p )</p>
<p>This framework is currently Beta for Silverlight applications, young as I said earlier, therefore if you are planning to use it be patient and hang on. Let&#8217;s jump right into the tests. You will need the following files, download them to a preferred location and be ready to add their assemblies to your test project in Visual Studio.</p>
<p><a href="http://www.artoftest.com/products/webaii.aspx" target="_blank">• [WebAii 2009 Framework|</a></p>
<p>• <a href="http://www.mbunit.com/Downloads.aspx" target="_blank">MbUnit</a></p>
<p>Once you have located the DLLs and assuming that you have Visual Studio, MbUnit and TestDrive.NET installed, go ahead and create a "MbUnit Test Project" in Visual Studio. Next, add a new TextFixture to your project and you are now ready to write some tests.</p>
<p><strong>Setting up the Test Fixture</strong></p>
<p>Once we've added the Fixture we should have something like this:</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Collections.Generic</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Linq</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Text</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">namespace</span> Editor<span style="color: #008000;">.</span><span style="color: #0000FF;">FunctionalTests</span><br />
<br />
<span style="color: #008000;">&#123;</span><br />
<br />
<span style="color: #6666cc; font-weight: bold;">class</span> SilverlightFunctionalTests<br />
<br />
<span style="color: #008000;">&#123;</span><br />
<br />
<span style="color: #008000;">&#125;</span><br />
<br />
<span style="color: #008000;">&#125;</span></div></div>
<p>Now, add the MbUnit attribute [TestFixture] to the class, (don&#8217;t forget to make it public). Additionally, add a SetUp method. The code should look like this:</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Collections.Generic</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Linq</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Text</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">MbUnit.Framework</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">namespace</span> Editor<span style="color: #008000;">.</span><span style="color: #0000FF;">FunctionalTests</span><br />
<br />
<span style="color: #008000;">&#123;</span><br />
<br />
<span style="color: #008000;">&#91;</span>TestFixture<span style="color: #008000;">&#93;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> SilverlightFunctionalTests<br />
<br />
<span style="color: #008000;">&#123;</span><br />
<br />
<span style="color: #008000;">&#91;</span>TestFixtureSetUp<span style="color: #008000;">&#93;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> SetUp<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
<br />
<span style="color: #008000;">&#123;</span><br />
<br />
<span style="color: #008000;">&#125;</span><br />
<br />
<span style="color: #008000;">&#125;</span><br />
<br />
<span style="color: #008000;">&#125;</span></div></div>
<p>Great! that was easy and I&#8217;m sure most of you are did this even before you read this. Next, we will add the WebAii to the Fixture. For the purpose of this example I will use a random URL, make sure you write yours correctly and that the URL you point to has the Silverlight application you are trying to test. I have added most of the WebAii set up within the SetUp method I just created, however feel free to put this code where you think it&#8217;s better. Go ahead and add the following code and then we&#8217;ll go over it:</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">MbUnit.Framework</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">ArtOfTest.WebAii.Core</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">ArtOfTest.WebAii.TestTemplates</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">ArtOfTest.WebAii.Silverlight</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Collections.Generic</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Linq</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">using</span> <span style="color: #008080;">System.Text</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">namespace</span> Editor<span style="color: #008000;">.</span><span style="color: #0000FF;">FunctionalTests</span><br />
<br />
<span style="color: #008000;">&#123;</span><br />
<br />
<span style="color: #008000;">&#91;</span>TestFixture<span style="color: #008000;">&#93;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> SilverlightFunctionalTests <span style="color: #008000;">:</span> BaseTest<br />
<br />
<span style="color: #008000;">&#123;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">private</span> SilverlightApp _app<span style="color: #008000;">;</span><br />
<br />
<span style="color: #008000;">&#91;</span>TestFixtureSetUp<span style="color: #008000;">&#93;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> SetUp<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
<br />
<span style="color: #008000;">&#123;</span><br />
<br />
Settings settings <span style="color: #008000;">=</span> GetSettings<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
settings<span style="color: #008000;">.</span><span style="color: #0000FF;">DefaultBrowser</span> <span style="color: #008000;">=</span> BrowserType<span style="color: #008000;">.</span><span style="color: #0000FF;">InternetExplorer</span><span style="color: #008000;">;</span><br />
<br />
settings<span style="color: #008000;">.</span><span style="color: #0000FF;">EnableSilverlight</span> <span style="color: #008000;">=</span> <span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">;</span><br />
<br />
Initialize<span style="color: #008000;">&#40;</span>settings<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
Manager<span style="color: #008000;">.</span><span style="color: #0000FF;">LaunchNewBrowser</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
ActiveBrowser<span style="color: #008000;">.</span><span style="color: #0000FF;">NavigateTo</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;URL&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
SilverlightAppsList apps <span style="color: #008000;">=</span> ActiveBrowser<span style="color: #008000;">.</span><span style="color: #0000FF;">SilverlightApps</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
_app <span style="color: #008000;">=</span> apps<span style="color: #008000;">.</span><span style="color: #0000FF;">ElementAt</span><span style="color: #008000;">&#40;</span><span style="color: #FF0000;">0</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
_app<span style="color: #008000;">.</span><span style="color: #0000FF;">Connect</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #008000;">&#125;</span><br />
<br />
<span style="color: #008000;">&#125;</span><br />
<br />
<span style="color: #008000;">&#125;</span></div></div>
<p><span style="color: #008000;">public class SilverlightFunctionalTests : BaseTest</span></p>
<p><span style="color: #008000;">private SilverlightApp _app;</span></p>
<p>&#8230;</p>
<p><span style="color: #008000;">Settings settings = GetSettings();</span></p>
<p><span style="color: #008000;">settings.DefaultBrowser = BrowserType.InternetExplorer;</span></p>
<p><span style="color: #008000;">settings.EnableSilverlight = true;</span></p>
<p><span style="color: #008000;">Initialize(settings);</span></p>
<p>&#8230;</p>
<p>The first thing you&#8217;ll notice is that I&#8217;ve added WebAii objects (Green) . Most of this is set up and you will have to copy this code as is. Here, I&#8217;ve added inheritance to the BaseTest class, created a SilverlightApp object and initialized the settings by setting the a default browser and enabling silverlight.</p>
<p><span style="color: #ff9900;">Manager.LaunchNewBrowser();</span></p>
<p><span style="color: #ff9900;">ActiveBrowser.NavigateTo(&#8220;URL&#8221;);</span></p>
<p><span style="color: #ff9900;">SilverlightAppsList apps = ActiveBrowser.SilverlightApps();</span></p>
<p><span style="color: #ff9900;">_app = apps.ElementAt(0);</span></p>
<p><span style="color: #ff9900;">_app.Connect();</span></p>
<p>The next thing I wrote (Orange) will launch the browser we set in the settings and it will make it navigate to the URL that we have specified. Then the code will tell the browser to find all the Silverlight applications in the page and return a SilverlightAppsList (list of Silverlight applications). For the purpose of this example we only have one application in the page, hence why I get the element at position 0 within the list. Finally, I set the global SilverlightApp and immediately after, I called Connect() on the SilverlightApp.</p>
<p>At this point we are ready to start writing tests.</p>
<p><strong>Writing Tests, finally!</strong></p>
<p>Here is the fun stuff. I will show you a test that does a simple thing, it will click on the Silverlight application. In this section of this article I will try to give you a very broad understanding of what you should do in order to write your own tests. The framework does offer several methods that will allow you to be creative with your tests. I&#8217;ll point some of the most used ones and then I&#8217;ll give you a link for you to digest the rest.</p>
<p>To the code.</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008000;">&#91;</span>Test<span style="color: #008000;">&#93;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> ClickingSilverlightApplication_ShouldClickTheApplication_Test<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
<br />
<span style="color: #008000;">&#123;</span><br />
<br />
<span style="color: #008080; font-style: italic;">//Preconditions</span><br />
<br />
FrameworkElement control <span style="color: #008000;">=</span> _app<span style="color: #008000;">.</span><span style="color: #0000FF;">FindName</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;PopupBorder1&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
control<span style="color: #008000;">.</span><span style="color: #0000FF;">Wait</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ForVisible</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #008080; font-style: italic;">//Actions</span><br />
<br />
control<span style="color: #008000;">.</span><span style="color: #0000FF;">User</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Click</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #008080; font-style: italic;">//Postconditions</span><br />
<br />
Assert<span style="color: #008000;">.</span><span style="color: #0000FF;">isTrue</span><span style="color: #008000;">&#40;</span><span style="color: #0600FF; font-weight: bold;">true</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #008000;">&#125;</span></div></div>
<p><span style="color: #008000;">//Preconditions</span></p>
<p><span style="color: #008000;">FrameworkElement control = _app.FindName(&#8220;PopupBorder1&#8243;);</span></p>
<p><span style="color: #008000;">control.Wait.ForVisible();</span></p>
<p>Fair enough, we have our precious test. It looks easy too\! As you can see, it works exactly as any unit test framework would. Allow me to explain it first. Initially (Green), I use the WebAii framework FindName method. There are a couple of things to say about this. FindName is a method that will look within the XAML of your silverlight application and it will try to find a XAML node with the Name attribute equal to the string you are passing to the method. The other thing I should say is that you can also call FindName like this: FindName&lt;T&gt;(&lt;string&gt;) where T is a specific type; I will show an example later on.</p>
<p>Keep in mind you have to know the Name attribute to find objects in the silverlight application. If the object is not found your test will time out and fail, so you will know. If it doesn&#8217;t then you&#8217;ll end up with a FrameworkElement or T if you used FindName&lt;T&gt;(&lt;string&gt;). As in the previous code, call Wait.ForVisible(). This will allow our test and the silverlight application to wait for each other.</p>
<p><span style="color: #ff9900;">control.User.Click();</span></p>
<p>The next piece of code (Orange) used the User property to call the action: Click(), simply to click on the found object. In this Actions section of the test you will usually be calling .User.&lt;Something&gt;, there are a lot of things that WebAii can do to mock the user functionality, here are some included on the version released at the moment I&#8217;m writing this article:</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">control<span style="color: #008000;">.</span><span style="color: #0000FF;">User</span><span style="color: #008000;">.</span><span style="color: #0000FF;">DragTo</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">...</span><span style="color: #008000;">&#41;</span><br />
<br />
control<span style="color: #008000;">.</span><span style="color: #0000FF;">User</span><span style="color: #008000;">.</span><span style="color: #0000FF;">HoverOver</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">...</span><span style="color: #008000;">&#41;</span><br />
<br />
control<span style="color: #008000;">.</span><span style="color: #0000FF;">User</span><span style="color: #008000;">.</span><span style="color: #0000FF;">KeyDown</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">...</span><span style="color: #008000;">&#41;</span><br />
<br />
control<span style="color: #008000;">.</span><span style="color: #0000FF;">User</span><span style="color: #008000;">.</span><span style="color: #0000FF;">KeyPress</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">...</span><span style="color: #008000;">&#41;</span><br />
<br />
control<span style="color: #008000;">.</span><span style="color: #0000FF;">User</span><span style="color: #008000;">.</span><span style="color: #0000FF;">MouseEnter</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">...</span><span style="color: #008000;">&#41;</span><br />
<br />
control<span style="color: #008000;">.</span><span style="color: #0000FF;">User</span><span style="color: #008000;">.</span><span style="color: #0000FF;">TypeText</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">...</span><span style="color: #008000;">&#41;</span></div></div>
<p>You can get all of them by using the IntelliSense feature in Visual Studio. Their documentation is pretty good too.</p>
<p>As promised, here is the example of the FindName&lt;T&gt; overload.</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008000;">&#91;</span>Test<span style="color: #008000;">&#93;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> FindEllipse_FindEllipseInApplication_Test<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
<br />
<span style="color: #008000;">&#123;</span><br />
<br />
<span style="color: #008080; font-style: italic;">//Preconditions</span><br />
<br />
Ellipse control <span style="color: #008000;">=</span> app<span style="color: #008000;">.</span><span style="color: #0000FF;">FindName</span><span style="color: #008000;">&amp;</span>lt<span style="color: #008000;">;</span>Ellipse<span style="color: #008000;">&amp;</span>gt<span style="color: #008000;">;</span><span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;SomeEllipse&quot;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
control<span style="color: #008000;">.</span><span style="color: #0000FF;">Wait</span><span style="color: #008000;">.</span><span style="color: #0000FF;">ForVisible</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #008080; font-style: italic;">//Actions</span><br />
<br />
<span style="color: #008080; font-style: italic;">//someaction</span><br />
<br />
<span style="color: #008080; font-style: italic;">//Postconditions</span><br />
<br />
<span style="color: #008080; font-style: italic;">//Asserts</span><br />
<br />
<span style="color: #008000;">&#125;</span></div></div>
<p><em>Word of advise: The returned Ellipse is not a Silverlight control, is a WebAii control which means they are different types of objects. This means you will need to be creative in order to assert the different properties of the object.</em></p>
<p><strong>Conclusion</strong></p>
<p>By now you should have a broad understanding of how the WebAii framework works for Silverlight and what it&#8217;s needed to create tests based on this framework. Additionally, you should be aware that there are many options when it comes to mocking the User behavior and that in order to find objects in your application and interact with them you will need their XAML Name attribute. If you have any questions or get stuck anywhere while testing with WebAii don&#8217;t hesitate to submit a comment or write me an email to my Ultimate Email</p>
<p>If you want to learn more about WebAii and Silverlight head over to <a href="http://www.artoftest.com/support/webaii/topicsindex.aspx" target="_blank">WebAii</a> and Silverlight Documentation</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jfigueroa.org/2009/silverlight-functional-testing-with-webaii-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Silverlight Testing with Microsoft Silverlight Testing Framework</title>
		<link>http://www.jfigueroa.org/2009/silverlight-testing-with-microsoft-silverlight-testing-framework/</link>
		<comments>http://www.jfigueroa.org/2009/silverlight-testing-with-microsoft-silverlight-testing-framework/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 23:26:26 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[thoughts]]></category>

		<guid isPermaLink="false">http://www.jfigueroa.org/?p=227</guid>
		<description><![CDATA[Summary This page intents to explain in simple non-technical words how some of the unit testing, specifically testing for the designer portion of the project, is being done. This page contains examples of some unit tests and an explanation of &#8230; <a href="http://www.jfigueroa.org/2009/silverlight-testing-with-microsoft-silverlight-testing-framework/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Summary</p>
<p>This page intents to explain in simple non-technical words how some of the unit testing, specifically testing for the designer portion of the project, is being done. This page contains examples of some unit tests and an explanation of their behavior.</p>
<p><strong>1. Getting Familiar with Silverlight </strong></p>
<p><span style="color: #00ff00;">If you are familiar with Silverlight already feel free to move on to section 2 of this page</span></p>
<p>For those of you that are not familiar with the Silverlight way of things, allow me to mention a couple of concepts to get you on the right track and to ease your understanding of the unit tests to follow.</p>
<p>Silverlight, in a nutshell, it&#8217;s driven by UserControls. These are Xaml files with code behind just like many other technologies from Microsoft, in Silverlight they are &#8220;rendered&#8221; when they are called in your browser.</p>
<p>For example:</p>
<div class="codecolorer-container xml default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="xml codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">xmlns=&quot;http://schemas.microsoft.com/winfx/2006/xaml/presentation&quot;<br />
<br />
xmlns:x=&quot;http://schemas.microsoft.com/winfx/2006/xaml&quot;</div></div>
<p>This Xaml, which represents a UserControl, will display a TextBlock with the Text content of Hello World.</p>
<p>These UserControls as you would expect, can be constructed in your code behind to dynamically add more content to it. For example:</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">TextBlock textBlock <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> TextBlock<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
textBlock<span style="color: #008000;">.</span><span style="color: #0000FF;">Text</span> <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;Hello World&quot;</span><span style="color: #008000;">;</span><br />
LayoutRoot<span style="color: #008000;">.</span><span style="color: #0000FF;">Children</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>textBlock<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span></div></div>
<p>To finalize this short Silverlight review, let me just say that obviously you can add as many other classes to a Silverlight project allowing the use of all of the wonders of Object Oriented programming, however only the UserControls will be the ones seen in the browser.</p>
<p>That&#8217;s it!</p>
<p><strong>2. Lets jump right to it&#8230;</strong></p>
<p>A simple file to test, and for the purpose of this example, it&#8217;s Editor.xaml file. This file is divided in 4 sections, when you open the Editor in a browser you would see the following:</p>
<p><img class="aligncenter size-full wp-image-229" title="editor screenshot" src="http://www.jfigueroa.org/wp-content/uploads/2009/08/editor-screenshot.png" alt="editor screenshot" width="330" height="630" /></p>
<p>As you can see there are 4 sections ( Menu, Tool Bar, Designer, Status Bar ). In Silverlight terms these sections are called Borders (I said I wouldn&#8217;t get technical, I know). The simplest test that I can think of, is to test if the rendered Editor Xaml page has 4 sections. Here is what the test would look like:</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008000;">&#91;</span>TestMethod<span style="color: #008000;">&#93;</span><br />
<span style="color: #008000;">&#91;</span>Asynchronous<span style="color: #008000;">&#93;</span><br />
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> XAML_EditorContainsFourRowsTest<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
<span style="color: #008000;">&#123;</span><br />
<span style="color: #008080; font-style: italic;">//Preconditions</span><br />
<span style="color: #6666cc; font-weight: bold;">int</span> rowDefinitions <span style="color: #008000;">=</span> <span style="color: #FF0000;">4</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #008080; font-style: italic;">//Actions</span><br />
TestPanel<span style="color: #008000;">.</span><span style="color: #0000FF;">Children</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>_page<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #008080; font-style: italic;">//Postconditions</span><br />
EnqueueCallback<span style="color: #008000;">&#40;</span> <span style="color: #008000;">&#40;</span>Action<span style="color: #008000;">&#41;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span> <span style="color: #008000;">=&amp;</span>gt<span style="color: #008000;">;</span> Assert<span style="color: #008000;">.</span><span style="color: #0000FF;">AreEqual</span><span style="color: #008000;">&#40;</span>_page<span style="color: #008000;">.</span><span style="color: #0000FF;">LayoutRoot</span><span style="color: #008000;">.</span><span style="color: #0000FF;">RowDefinitions</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Count</span>, rowDefinitions <span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
EnqueueTestComplete<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<span style="color: #008000;">&#125;</span></div></div>
<p>The first thing you&#8217;ll notice is that this test looks similar to what a test would look in any other framework, i.e. MbUnit, etc.. The next thing you&#8217;ll notice is the [Asynchronous] tag. This is because Silverlight Unit Test Framework has support of asynchronous calls that are used when UserControls have data driven service calls. The last thing you&#8217;ll notice is that I&#8217;ve divided the method in 3 sections. I do it because it looks organized and I think is good practice. Preconditions includes initialization of variables and objects later used in the postconditions assertions against data gathered in the actions section. Actions includes calls to the object in test, in the example &#8220;_page&#8221; was added to the TestPanel UserControl. Postconditions includes assertions. Calls to EnqueueCallback and EnqueueTestComplete are part of the Asynchronous feature.</p>
<p>If this test wasn&#8217;t Asynchronous it would look like this:</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008000;">&#91;</span>TestMethod<span style="color: #008000;">&#93;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> XAML_EditorContainsFourRowsTest<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
<br />
<span style="color: #008000;">&#123;</span><br />
<br />
<span style="color: #008080; font-style: italic;">//Preconditions</span><br />
<br />
<span style="color: #6666cc; font-weight: bold;">int</span> rowDefinitions <span style="color: #008000;">=</span> <span style="color: #FF0000;">4</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #008080; font-style: italic;">//Actions</span><br />
<br />
TestPanel<span style="color: #008000;">.</span><span style="color: #0000FF;">Children</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>_page<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #008080; font-style: italic;">//Postconditions</span><br />
<br />
Assert<span style="color: #008000;">.</span><span style="color: #0000FF;">AreEqual</span><span style="color: #008000;">&#40;</span>_page<span style="color: #008000;">.</span><span style="color: #0000FF;">LayoutRoot</span><span style="color: #008000;">.</span><span style="color: #0000FF;">RowDefinitions</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Count</span>, rowDefinitions <span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #008000;">&#125;</span></div></div>
<p>Now, lets look at a more involved test. This next test is a test to a method in the AccordionToolBox UserControl.</p>
<p>The Accordion ToolBox currently looks like this:</p>
<p><img class="aligncenter size-full wp-image-282" title="accordion toolbox screenshot" src="http://www.jfigueroa.org/wp-content/uploads/2009/08/accordion-toolbox-screenshot.png" alt="accordion toolbox screenshot" width="122" height="203" /></p>
<p>Simply has an Accordion Silverlight control with some AccordionItem Silverlight controls and inside of each AccordionItem there is a StackPanel Silverlight control with some Buttons in it. In the UltiStudio world this are the equivalents:</p>
<ul>
<li>AccordionItem EQUALS Section</li>
<li>Button inside StackPanel of AccordionItem EQUALS a Section Item</li>
</ul>
<p>Here is a test to make sure that the code creating a section actually creates a section behind the scenes or dynamically.</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008000;">&#91;</span>TestMethod<span style="color: #008000;">&#93;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> InitializeSectionContent_Test<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
<br />
<span style="color: #008000;">&#123;</span><br />
<br />
<span style="color: #008080; font-style: italic;">//Preconditions</span><br />
<br />
ToolBoxSection toolBoxSection <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> ToolBoxSection<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;General&quot;</span>, <span style="color: #FF0000;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
ToolBoxItem item <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> ToolBoxItem<span style="color: #008000;">&#40;</span><span style="color: #666666;">&quot;1 Column Section&quot;</span>, <span style="color: #FF0000;">1</span>, <span style="color: #FF0000;">1</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
toolBoxSection<span style="color: #008000;">.</span><span style="color: #0000FF;">Items</span> <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Collection<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
toolBoxSection<span style="color: #008000;">.</span><span style="color: #0000FF;">Items</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>item<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #6666cc; font-weight: bold;">int</span> expectedSectionSize <span style="color: #008000;">=</span> <span style="color: #FF0000;">1</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #008080; font-style: italic;">//Actions</span><br />
<br />
AccordionItem accordionItem <span style="color: #008000;">=</span> _accordionToolBox<span style="color: #008000;">.</span><span style="color: #0000FF;">InitializeSectionContent</span><span style="color: #008000;">&#40;</span>toolBoxSection<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
StackPanel accordionContent <span style="color: #008000;">=</span> accordionItem<span style="color: #008000;">.</span><span style="color: #0000FF;">Content</span> <span style="color: #0600FF; font-weight: bold;">as</span> StackPanel<span style="color: #008000;">;</span><br />
<br />
<span style="color: #008080; font-style: italic;">//Postconditions</span><br />
<br />
Assert<span style="color: #008000;">.</span><span style="color: #0000FF;">IsNotNull</span><span style="color: #008000;">&#40;</span>accordionItem<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
Assert<span style="color: #008000;">.</span><span style="color: #0000FF;">AreEqual</span><span style="color: #008000;">&#40;</span>accordionContent<span style="color: #008000;">.</span><span style="color: #0000FF;">Children</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Count</span>, expectedSectionSize<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #008000;">&#125;</span></div></div>
<p>Assuming you read the previous test, you&#8217;ll know how this test is divided. The test is simple hardcoding a section with an item and passing it to the InitializeSectionContent method in the AccordionToolBox UserControl, then the test verifies that the method created an AccordionItem with the section properties which include the item inside its StackPanel.</p>
<p>As per the comment I received from Robert, the _accordionToolBox object is variable that I initialized in the setup portion of the fixture. It would look something like this:</p>
<div class="codecolorer-container csharp default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="csharp codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #008000;">&#91;</span>TestClass<span style="color: #008000;">&#93;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">class</span> AccordionToolBoxTests <span style="color: #008000;">:</span> SilverlightTest<br />
<br />
<span style="color: #008000;">&#123;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">private</span> AccordionToolBox _accordionToolBox<span style="color: #008000;">;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">private</span> Mock _mockFactory<span style="color: #008000;">;</span><br />
<br />
List _sections<span style="color: #008000;">;</span><br />
<br />
<span style="color: #008000;">&#91;</span>TestInitialize<span style="color: #008000;">&#93;</span><br />
<br />
<span style="color: #0600FF; font-weight: bold;">public</span> <span style="color: #6666cc; font-weight: bold;">void</span> SetUp<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><br />
<br />
<span style="color: #008000;">&#123;</span><br />
<br />
_mockFactory <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> Mock<span style="color: #008000;">&#40;</span>MockBehavior<span style="color: #008000;">.</span><span style="color: #0000FF;">Strict</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
_sections <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> List<span style="color: #008000;">&#40;</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
_accordionToolBox <span style="color: #008000;">=</span> <a href="http://www.google.com/search?q=new+msdn.microsoft.com"><span style="color: #008000;">new</span></a> AccordionToolBox<span style="color: #008000;">&#40;</span>_mockFactory<span style="color: #008000;">.</span><span style="color: #6666cc; font-weight: bold;">Object</span><span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
TestPanel<span style="color: #008000;">.</span><span style="color: #0000FF;">Children</span><span style="color: #008000;">.</span><span style="color: #0000FF;">Add</span><span style="color: #008000;">&#40;</span>_accordionToolBox<span style="color: #008000;">&#41;</span><span style="color: #008000;">;</span><br />
<br />
<span style="color: #008000;">&#125;</span></div></div>
<p>Don&#8217;t mind the Mock if you are not familiar with it, Mock falls outside the scope of this article.</p>
<p>For now, I will leave this document as is, and if you have questions and suggestion please let me know, I will keep adding to it along with our development.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jfigueroa.org/2009/silverlight-testing-with-microsoft-silverlight-testing-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Corazón de Melón</title>
		<link>http://www.jfigueroa.org/2008/corazon-de-melon/</link>
		<comments>http://www.jfigueroa.org/2008/corazon-de-melon/#comments</comments>
		<pubDate>Wed, 10 Sep 2008 02:42:43 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[thoughts]]></category>

		<guid isPermaLink="false">http://javierfigueroa.wordpress.com/?p=69</guid>
		<description><![CDATA[Pensé que el huracán había pasado pero la calma antes de la tormenta nunca había llegado y mi respiración iba a cien. Como una bala traté de disparar mis palabras en el papel pero quizás mi revolver se quedo sin &#8230; <a href="http://www.jfigueroa.org/2008/corazon-de-melon/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p class="Body" style="padding-top:0;">Pensé que el huracán había pasado pero la calma antes de la tormenta nunca había llegado y mi respiración iba a cien. Como una bala traté de disparar mis palabras en el papel pero quizás mi revolver se quedo sin munición. En busca de inspiración y de un poco de ignición, escuche la música que me ayuda a pasar el tiempo… No fue fácil, no fue fácil saber que este mundo gira y que tu giras con el. Los sentimientos se apoderan de mi cuando la verdad se apodera de mis sentimientos y veo como el mundo se cae a pedazos. Rompecabezas de imágenes que vemos en la tele y sin embargo seguimos viendo. Si miramos, aceptamos y si no, nadie nos acepta. El himno sin melodía de aquellos como yo que viven del detalle pero pretenden lo contrario.</p>
<p class="Body">Como una rosa con espinas defendiéndose de no se sabe que. Los días pasan y pensamos más que nadie pero nadie nos piensa. Miramos al mundo de un punto óptico del cual no existe perspectiva obtusa… fácil de entender. Mientras recordamos las memorias de otras, los huracanes seguirán estremeciendo el cielo y acabando con lo que se enfrenten. Nosotros mientras ellos lloran, bailamos al ritmo de la elección y como por amnesia el dolor pierde sentido. Acuérdate de que tu eres el cambio del mundo y que eres producto del amor de dos y como deber, amor tienes que dar.</p>
<p class="Body">Por no terminar las palabras de forma inoficiosa y con sabor a religión o política, igual, piensa en tu madre. Piensa en tu padre. Si te es difícil mirar dentro de ti, dentro del músculo, corazón. Corazón te pido que pienses, OK? Si te reis, corazón tienes, si no, más corazón tiene un melón. Melón que por culpa de la vida dulce ha dejado de ser.</p>
<p class="Body">
<p>Rocko</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jfigueroa.org/2008/corazon-de-melon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Está lloviendo adentro</title>
		<link>http://www.jfigueroa.org/2008/esta-lloviendo-adentro/</link>
		<comments>http://www.jfigueroa.org/2008/esta-lloviendo-adentro/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 02:42:09 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[thoughts]]></category>

		<guid isPermaLink="false">http://javierfigueroa.wordpress.com/?p=67</guid>
		<description><![CDATA[Sentado en el suelo de mi posada me quede aturdido mirándole los ojos a Soledad. Ella me miro fijamente y yo igual a ella. Al parpadear de sus ojos ella me paralizó. Entonces igual a un fantasma ella se levanto &#8230; <a href="http://www.jfigueroa.org/2008/esta-lloviendo-adentro/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p class="Body" style="padding-top:0;">Sentado en el suelo de mi posada me quede aturdido mirándole los ojos a Soledad. Ella me miro fijamente y yo igual a ella. Al parpadear de sus ojos ella me paralizó. Entonces igual a un fantasma ella se levanto del suelo, despacio y con un aire ténebre. Yo, un poco asustado, sin saber que se le ocurriría a Soledad esta vez, traté de moverme. Todos mis esfuerzos fueron en vano. Ella se desplazó hacia mi, lentamente, flotando… entrando en mi aura y dándome un frío infernal. Intenté gritar, no pude.</p>
<p class="Body">Rara vez veía a Soledad con la cara que hoy tienes.</p>
<p class="Body">Entonces como si yo pesara menos que una pluma, especialmente encontrándome sentado como indio, Soledad me levantó con su mirada. Suspendido en el aire, la habitación se tornó más oscura que antes. Vi las caras amigas de Soledad, el miedo empezó a apoderarse de mi, se empezó a apoderar de mi alma. En aquel instante sentí la presión de todo un océano en mi cuerpo y perdí la respiración. Sin embargo, la vista era clara, veía a Soledad y por alguna loca razón no me era posible parpadear. Sentí el aire afanado saliendo de mi cuerpo, las gotas de oxigeno evaporarse con el momento. Mire a soledad… sabia sus intenciones… era muy tarde para reaccionar. Cedí.</p>
<p class="Body">Entonces mi cuerpo ya no era mío&#8230; y mi alma era yo. La presión se fue pero el agua no. Habiendo visto mi ego y sus amigos partir con mis ojos abiertos, perdí de vista a Soledad. Tratando de moverme, cómo para salir del trance, moví mi cabeza. Estaba de vuelta en el suelo. Me levante a mitad de cuerpo y me volví a sentar como indio. Mire alrededor y no vi más que paredes blancas. Silencio agotador, ensordecedor. Por causa de la voz del silencio escuché el brotar del agua. Como consecuencia presentí la presión venir de nuevo pero, ¿Donde esta soledad? , me pregunté. Entonces miré al borde de la pared más blanca y más cercana de mi, y como sangre en guerra, mis paredes empezaron a sangrar agua. Vi el llover de las paredes, el agua cristalina se deslizaba hasta el techo y en el techo se perdía. Hipnotizado por tan bello acontecimiento vi a Soledad salir de la pared. Excitado por compartir con alguien aquel fenómeno, trate de llamarle la atención. Ella me ignoro como siempre.</p>
<p class="Body">Soledad caminó alrededor del cuarto pasando sus dedos entre el agua de las paredes y mirándome. Sentí miedo otra vez. La mire de nuevo a los ojos y sin movimiento me dejo otra vez. La vi acercase a mi con cara de yo no fui. Puso su cara sobre la mía. Nos miramos… Entrándose por mi boca sentí su fría piel&#8230; no se cómo pasó. La sentí adentro de mi, un sentimiento que ya era común.</p>
<p class="Body">Me dije a mi mismo que lo que acababa de suceder era un sueño, me prometí no mencionarlo a nadie. Irónicamente, todos los días bailamos el mismo tango y ella sigue haciendo llorar mis paredes. Crónicamente, a veces siento que el sueño soy yo. La parte que no comparto, es cuando ella me habla, esa parte me la guardo para mi. Suele ser la parte donde la presión desaparece y el caer del agua. Me la guardo para evitar… para evitar visitas al psicólogo.</p>
<p class="Body">
<p>Rocko</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jfigueroa.org/2008/esta-lloviendo-adentro/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Por un segundo</title>
		<link>http://www.jfigueroa.org/2008/por-un-segundo/</link>
		<comments>http://www.jfigueroa.org/2008/por-un-segundo/#comments</comments>
		<pubDate>Tue, 19 Aug 2008 02:41:38 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[thoughts]]></category>

		<guid isPermaLink="false">http://javierfigueroa.wordpress.com/?p=65</guid>
		<description><![CDATA[Estaba un hombre parado en la esquina de mis ojos, estaba él allí mirándome mientras yo lo miraba a él. Entre nuestras miradas veíamos las distancias tan cortas que atravesaban las montañas de mi conciencia pero a la vez eran &#8230; <a href="http://www.jfigueroa.org/2008/por-un-segundo/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p class="Body" style="padding-top:0;">Estaba un hombre parado en la esquina de mis ojos, estaba él allí mirándome mientras yo lo miraba a él. Entre nuestras miradas veíamos las distancias tan cortas que atravesaban las montañas de mi conciencia pero a la vez eran imposibles de medir. El tiempo repentinamente se congelaba más con cada parpadeo de ojos y el cortante aire empañaba mis pupilas. Sin poder soportar el aire y la penetrante, y al mismo tiempo incomoda miradera, miré a mi alrededor… nada, nada existía solo yo. Estaba un hombre parado en la mitad de la nada mirando a otro hombre en la esquina de sus ojos. Como por arte de magia a este punto de este relato ya somos tres hombres mirándonos en la nada. Curiosamente el hombre, el que originalmente había visto en la punta de mis ojos, se torno azul, azul de mar y de frío. Empezó a derretirse cual peñasco de hielo se desdobla ante la imponencia solar. Lo vi pasar de estado sólido a no estado y en aquel preciso momento la nada era ahora una nada azul. Entonces cuando supe que no sabia lo que estaba pasando entendí que el suelo en el cual yo me reconfortaba, pues era lo uno que parecía real, se empezó a desprender como cuando se empúñala una hoja seca. Trate de correr, por lo menos en mi mente, pero fue inevitable, caí… en espera de agua fría y de un congelon de los que queman, caí en un vacío, un vacío interior… una soledad. Extrañé al hombre de la esquina de mis ojos y sentí al desquicie que perfuma a la soledad. Fue en aquel instante eterno que quizá por aquello de la gravedad newtoniana paré de caer. Físicamente seguí cayendo pero en mi mente no. Fue un desdoble espiritual donde el orgasmo de tu alma alcanza a tu espíritu y sientes por un segundo tu verdadero yo. Hermoso apasionante encuentro. Desafortunadamente las cosas buenas no duran más de un segundo y mi cuerpo termino de caer. He así como vivo hoy en día, físicamente cayendo y mentalmente buscando aquel segundo estelar.</p>
<p class="Body">
<p>Rocko</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jfigueroa.org/2008/por-un-segundo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

